diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..21d78da
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
+patreon: TheDIYGuy999
+open_collective: # Replace with a single Open Collective username
+ko_fi: # Replace with a single Ko-fi username
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: "https://paypal.me/thediyguy999"
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..26a67c9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+.pio
+.vscode/.browse.c_cpp.db*
+.vscode/c_cpp_properties.json
+.vscode/launch.json
+.vscode/ipch
+**/.DS_Store
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..080e70d
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,10 @@
+{
+ // See http://go.microsoft.com/fwlink/?LinkId=827846
+ // for the documentation about the extensions.json format
+ "recommendations": [
+ "platformio.platformio-ide"
+ ],
+ "unwantedRecommendations": [
+ "ms-vscode.cpptools-extension-pack"
+ ]
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..181a0c4
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,9 @@
+{
+ "files.associations": {
+ "array": "cpp"
+ },
+ "githubPullRequests.ignoredPullRequestBranches": [
+ "main"
+ ],
+ "cmake.configureOnOpen": false
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index 0dc7231..364db88 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,150 @@
-# Servotester_Deluxe
\ No newline at end of file
+# Servotester_Deluxe (with improved software)
+
+The original autor is "Der RC Modellbauer": https://www.youtube.com/@DerRCModellbauer
+
+forked from his GitHub: https://github.com/Ziege-One/Servotester_Deluxe
+
+PCB, schematic and more details: https://www.pcbway.com/project/shareproject/Servotester_Deluxe_62a3f47c.html
+
+Support thread (in German and English): https://www.rc-modellbau-portal.de/index.php?threads/servotester-deluxe-von-der-rc-modellbauer-mit-meiner-erweiterten-software.17383/
+
+## How to program it
+- With Arduino IDE
+- With Visual Studio Code (recommended)
+- With ESPHome-Flasher (for pre compiled .bin files, depending on your display)
+
+## Schematic
+
+
+
+
+
+
+## Menu
+
+
+## Oscilloscope 0 - 3.3V
+
+
+
+
+## Calculator
+
+
+## Features
+- 5 channel PWM Signal generator for the following modes: STD, NOR, SHR, SSR, SUR, SXR
+- manual or automatic movement modes
+- PWM read function with pulsewidth and frequency display
+- PPM, SBUS and IBUS read function
+- Oscilloscope for 3.3V RC signals, PWM and PPM signals can be visualized well
+- Signal generator on GPIO 26
+- Calculator
+- P O N G game
+- Flappy Birds game
+- Settings menu, parameters are stored in EEPROM
+- Operation via rotary encoder with push button
+- Supply via USB (for small servos) or XT-60 plug
+- 0.96 or 1.3 Inch OLED display
+- Some functions can be controlled via the built in website
+
+
+## TODO Software ****************************************
+- remove PPM menu delay
+- Menu: Add beep on / off
+- Add servo output in signal read mode (decoder)
+- Improve Signal generator
+
+## TODO Hardware ****************************************
+- Capacitor for 5V rail
+- Capacitor for smooth upload
+- Anti backfeed diode
+- Room for buzzer
+- I2C Connector for gyro sensor
+- Reset button
+
+## ******************************************************
+
+## Changelog
+
+## New in v0.16-beta.2:
+- No very long beep during WiFi enable / disable anymore
+- WiFi symbol shown, if enabled
+
+## New in v0.16-beta.1:
+- Wifi can be enabled and disabled without reboot
+- Oscilloscope crashing, if WiFi off: no fix so far, leave WiFi enabled...
+- Temporary fix: #define FAST_ADC in 0_general settings.h (only use it, if WiFi is always on)
+- Web interface enhanced
+
+## New in v0.16-beta.0:
+- Signal generator added on GPIO 26 (frequency setting still buggy, triangle not working)
+- Oscilloscope potentially crashing on some devices: bugfix attempt
+
+## New in v0.15.0:
+- Much nicer sine curves on the oscilloscope thanks to the new ADC_LINEARITY_COMPENSATION option in "0_generalSettings.h"
+- Oscilloscope sampling delay up to 300 µs
+- Oscilloscope is about 8 times faster now. Allows to analyze 1600 Hz SXR siganls way better
+- Frequency and duty cycle averaging in oscilloscope
+- Encoder acceleration enlarged
+- Battery voltage not actualized during power scale adjustment: bug fixed
+- EEPROM factory reset option in settings menu
+- Servo endpoints and centerpoint are adjustable in 2 groups: STD, NOR, SHR and SSR, SUR, SXR and saved in EEPROM
+- Software version is displayed earlier (after logo)
+
+## New in v0.14.0:
+- Oscilloscope added
+- BUS & oscilloscope input is on CH 5 now
+- Precise frequency counter in PWM impulse read mode added
+- fixed PWM impulse read bargraph issues
+- SSL servo mode removed, because it was useless
+- SSR, SUR and SXR frequencies changed, now working with Sanwa PGS-CL II servo
+- Added support for active 3V buzzer on GPIO 4
+- Calculator: added power of
+- ESP32Servo library removed, repaced with native MCPWM ESP32 functionality. Allows way faster servo timings
+- A lot of new servo modes added, names are displayed on screen
+
+## New in v0.13.0:
+- Servo Hz setting effective on all servo channels and in automatic mode
+- Bug fixed: Automatic mode not working in 560 Hz mode
+- Bug fixed: Servo angle wrong in 560 Hz mode
+- Bug fixed: progress bar out of range in impulse read mode
+- Cleaned up frequency selection code
+- Microseconds servo range is now displayed in the servo frequency settings menu
+- A little calculator was added
+
+## New in v0.12.0:
+- Added a Flappy Birds Game
+- Alternative logo optimized
+
+## New in v0.11.0:
+- Added a Pong game ;-)
+- Ball speed is adjustable in settings
+
+## New in v0.10.0:
+- Added encoder acceleration in servo tester mode. Makes the operation very handy. If you want to make bigger servo movements, just rotate the encoder faster!
+- Unstable Multiswitch issues because of incompatible espressif 32 board solved, see comments in src.ino
+
+## New in v0.9.0:
+- Servo is able to oscillate way faster in automatic mode, speed adjustability improved
+- Made sure, there is no language string array pointer overflow, if EEPROM was deleted before
+- There are still issues with unstable Multiswitch readings. Solution for now: use the pre compiled bin files or use Arduino IDE 2.0.3 with espressif 32 board 2.0.5 (which is unfortunately incompatible with VS Code)
+
+## New in v0.8.0:
+- Support for calibrated analogRead, using the ESP32AnalogRead library is improving battery monitoring
+- Number of LiPo battery cells is displayed
+- Message, if no valid battery is detected
+- Support for French language added
+
+## New in v0.7.1:
+- ESPHome-Flasher discovered a serious EEMPOM bug, because flash is erased before upload. It should now be fixed.
+
+## New in v0.7.0:
+- It is now compatible with VS Code / Platformio. This makes board and library version management way easier, because all is defined in platformio.ini and downloaded automatically. Of course it is still compatible with Arduino IDE
+- No external SBUS library required anymore
+- Adjustable WiFi power
+- Support for alternative logo
+- New menu options:
+-- Encoder direction inversed or not
+-- SBUS inversed or not
+-- Language English or German (others could easily be added)
+-- Help text is displayed during start
diff --git a/Servotester_Deluxe/Servotester_Deluxe.ino b/Servotester_Deluxe/Servotester_Deluxe.ino
deleted file mode 100644
index be7713a..0000000
--- a/Servotester_Deluxe/Servotester_Deluxe.ino
+++ /dev/null
@@ -1,1649 +0,0 @@
-/*
- Servotester Deluxe
- Ziege-One (Der RC-Modelbauer)
-
- ESP32 + Encoder + OLED
-
- /////Pin Belegung////
- GPIO 13: Servo1
- GPIO 14: Servo2
- GPIO 27: Servo3
- GPIO 33: Servo4
- GPIO 32: Servo5
- GPIO 15: Ecoder Taster
- GPIO 16: Ecoder Richtung 1
- GPIO 17: Ecoder Richtung 2
-
- GPIO 21: SDA OLED
- GPIO 22: SDL OLED
- */
-
-// ======== Servotester Deluxe =======================================
-
-/* Boardversion
-ESP32 2.0.5
- */
-
-/* Installierte Bibliotheken
-ESP32Servo 0.12.1
-ESP32Encoder 0.10.1
-Bolder Flight Systems SBUS 8.1.4
-IBusBM 1.1.4
-ESP8266 and ESP OLED driver SSD1306 displays 4.3.0
- */
-
-#include
-#include
-#include
-#include
-#include "sbus.h"
-#include
-
-#include //1.3 Zoll
-#include "SSD1306Wire.h"
-
-const float Version = 0.6; // Software Version
-
-//#define OLED1306 //0.96 Zoll
-
-// EEprom
-#define EEPROM_SIZE 28
-
-#define adr_eprom_WIFI_ON 0 // WIFI 1 = Ein 0 = Aus
-#define adr_eprom_SERVO_STEPS 4 // SERVO Steps für Encoder im Servotester Modus
-#define adr_eprom_SERVO_MAX 8 // SERVO µs Max Wert im Servotester Modus
-#define adr_eprom_SERVO_MIN 12 // SERVO µs Min Wert im Servotester Modus
-#define adr_eprom_SERVO_Mitte 16 // SERVO µs Mitte Wert im Servotester Modus
-#define adr_eprom_SERVO_Hz 20 // SERVO µs Mitte Wert im Servotester Modus
-#define adr_eprom_POWER_SCALE 24 // SERVO µs Mitte Wert im Servotester Modus
-
-//Speicher der Einstellungen
-int WIFI_ON;
-int SERVO_STEPS;
-int SERVO_MAX;
-int SERVO_MIN;
-int SERVO_Mitte;
-int SERVO_Hz;
-int POWER_SCALE;
-
-//Encoder + Taster
-ESP32Encoder encoder;
-
-int button_PIN = 15; // Hardware Pin Button
-int encoder_Pin1 =16; // Hardware Pin1 Encoder
-int encoder_Pin2 =17; // Hardware Pin2 Encoder
-long prev = 0; // Zeitspeicher für Taster
-long prev2 = 0; // Zeitspeicher für Taster
-long previousDebouncTime = 0; // Speicher Entprellzeit für Taster
-int buttonState = 0; // 0 = Taster nicht betätigt; 1 = Taster langer Druck; 2 = Taster kurzer Druck; 3 = Taster Doppelklick
-int encoderState = 0; // 1 = Drehung nach Links (-); 2 = Drehung nach Rechts (+)
-int Duration_long = 600; // Zeit für langen Druck
-int Duration_double = 200; // Zeit für Doppelklick
-int bouncing = 50; // Zeit für Taster Entprellung
-int encoder_last; // Speicher letzer Wert Encoder
-int encoder_read; // Speicher aktueller Wert Encoder
-
-// Servo
-volatile unsigned char servopin[5] ={13, 14, 27, 33, 32}; // Pins Servoausgang
-Servo servo[5]; // Servo Objekte erzeugen
-int servo_pos[5]; // Speicher für Servowerte
-int servocount = 0; // Zähler für Servowerte
-
-// SBUS
-bfs::SbusRx sbus_rx(&Serial2,servopin[0], servopin[0]+1,true); // Sbus auf Serial2
-
-bfs::SbusData sbus_data;
-
-// IBUS
-IBusBM IBus; // IBus object
-
-// Externe Spannungsversorgung
-int Power_PIN = 36; // Hardware Pin Externe Spannung in
-bool Power_EN; // Akku vorhanden
-int Power_Zel; // Akkuzellen
-float Power_V; // Akkuspannung in V
-float Power_V_per; // Akkuspannung in Prozent
-
-//Menüstruktur
-/*
- * 1 = Servotester_Auswahl Auswahl -> 10 Servotester_Menu
- * 2 = Automatik_Modus_Auswahl Auswahl -> 20 Automatik_Modus_Menu
- * 3 = Impuls_lesen_Auswahl Auswahl -> 30 Impuls_lesen_Menu
- * 4 = Multiswitch_lesen_Auswahl Auswahl -> 40 Multiswitch_lesen_Menu
- * 5 = SBUS_lesen_Auswahl Auswahl -> 50 SBUS_lesen_Menu
- * 6 = Einstellung_Auswahl Auswahl -> 60 Einstellung_Menu
- */
-enum
-{
- Servotester_Auswahl = 1,
- Automatik_Modus_Auswahl = 2,
- Impuls_lesen_Auswahl = 3,
- Multiswitch_lesen_Auswahl = 4,
- SBUS_lesen_Auswahl = 5,
- IBUS_lesen_Auswahl = 6,
- Einstellung_Auswahl = 7,
- //
- Servotester_Menu = 10,
- Automatik_Modus_Menu = 20,
- Impuls_lesen_Menu = 30,
- Multiswitch_lesen_Menu = 40,
- SBUS_lesen_Menu = 50,
- IBUS_lesen_Menu = 60,
- Einstellung_Menu = 70
-};
-
-//-Menu 20 Automatik Modus
-
-int Autopos[5]; //Speicher
-bool Auto_Pause = 0; //Pause im Auto Modus
-
-//-Menu 40 Multiwitch Futaba lesen
-
-#define kanaele 9 //Anzahl der Kanäle
-int value1[kanaele]; //Speicher
-
-//-Menu 30 Impuls lesen
-int Impuls_min = 1000;
-int Impuls_max = 2000;
-
-//-Menu
-int Menu = Servotester_Auswahl; // Aktives Menu
-bool SetupMenu = false; // Zustand Setupmenu
-int Einstellung =0 ; // Aktives Einstellungsmenu
-bool Edit = false; // Einstellungen ausgewählt
-
-//OLED
-#ifdef OLED1306
-SSD1306Wire display(0x3c, SDA, SCL); // Oled Hardware an SDA 21 und SCL 22
-#else
-SH1106Wire display(0x3c, SDA, SCL); // Oled Hardware an SDA 21 und SCL 22
-#endif
-
-// Startlogo
-#include "images.h"
-
-// Wlan Einstellungen AP Modus
-const char* ssid = "Servotester_Deluxe";
-const char* password = "123456789";
-
-// Webserver auf Port 80
-WiFiServer server(80);
-
-// Speicher HTTP request
-String header;
-
-// Für HTTP GET value
-String valueString = String(5);
-int pos1 = 0;
-int pos2 = 0;
-
-unsigned long currentTime = millis(); // Aktuelle Zeit
-unsigned long currentTimeAuto = millis(); // Aktuelle Zeit für Auto Modus
-unsigned long currentTimeSpan = millis(); // Aktuelle Zeit für Externe Spannung
-unsigned long previousTime = 0; // Previous time
-unsigned long previousTimeAuto = 0; // Previous time für Auto Modus
-unsigned long previousTimeSpan = 0; // Previous time für Externe Spannung
-unsigned long TimeAuto = 50; // Auto time
-const long timeoutTime = 2000; // Define timeout time in milliseconds (example: 2000ms = 2s)
-
-//MAP als Float
-float map_float(float x, float in_min, float in_max, float out_min, float out_max)
-{
- return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
-}
-
-// ======== Setup =======================================
-void setup() {
- // Setup Serial
- Serial.begin(115200);
-
- //EEPROM
- EEPROM.begin(EEPROM_SIZE);
- EEprom_Load(); // Einstellung laden
- Serial.println(WIFI_ON);
- Serial.println(SERVO_STEPS);
- Serial.println(SERVO_MAX);
- Serial.println(SERVO_MIN);
- Serial.println(SERVO_Mitte);
- Serial.println(POWER_SCALE);
-
- if (SERVO_MIN < 500) { //EEporm int Werte
- WIFI_ON = 1; //Wifi ein
- SERVO_STEPS = 10;
- SERVO_MAX = 2000;
- SERVO_MIN = 1000;
- SERVO_Mitte = 1500;
- SERVO_Hz = 50;
- POWER_SCALE = 500;
- }
-
- // Setup Encoder
- ESP32Encoder::useInternalWeakPullResistors=UP;
- encoder.attachHalfQuad(encoder_Pin1, encoder_Pin2);
- pinMode(button_PIN,INPUT_PULLUP); // Button_PIN = Eingang
-
- pinMode(Power_PIN,INPUT); //
-
-
- // Setup OLED
- display.init();
- display.flipScreenVertically();
- display.setFont(ArialMT_Plain_10);
- display.drawXbm(0, 0, Logo_width, Logo_height, Logo_bits);
- display.display();
-
- delay(1000);
-
- if (WIFI_ON == 1) { //Wifi Ein
- // Print local IP address and start web server
- Serial.print("AP (Zugangspunkt) einstellen…");
- WiFi.softAP(ssid, password);
-
- IPAddress IP = WiFi.softAPIP();
- Serial.print("AP-IP-Adresse: ");
- Serial.println(IP);
-
- display.clear();
- display.setTextAlignment(TEXT_ALIGN_LEFT);
- display.setFont(ArialMT_Plain_16);
- display.drawString(0, 10, "WiFi on.");
- display.drawString(0, 26, "IP address: ");
- display.drawString(0, 42, IP.toString());
- display.display();
- delay(2000);
-
- display.clear();
- display.setTextAlignment(TEXT_ALIGN_LEFT);
- display.setFont(ArialMT_Plain_16);
- display.drawString(0, 0, "SSID: ");
- display.drawString(0, 16, ssid);
- display.drawString(0, 32, "Password: ");
- display.drawString(0, 48, password);
- display.display();
- delay(3000);
-
- server.begin(); // Start Webserver
- }
- else
- {
- Serial.println("");
- Serial.println("WiFi off.");
-
- display.clear();
- display.setTextAlignment(TEXT_ALIGN_LEFT);
- display.setFont(ArialMT_Plain_16);
- display.drawString(0, 10, "WiFi");
- display.drawString(0, 26, "off.");
- display.display();
- delay(2000);
- }
-
- display.clear();
- display.setTextAlignment(TEXT_ALIGN_CENTER);
- display.setFont(ArialMT_Plain_16);
- display.drawString(64, 10, "Version:");
- display.drawString(64, 26, String(Version));
- display.display();
- delay(1000);
-
-
- encoder.setCount(Menu);
- servo_pos[0] = 1500;
- servo_pos[1] = 1500;
- servo_pos[2] = 1500;
- servo_pos[3] = 1500;
- servo_pos[4] = 1500;
-}
-
-// ======== Loop =======================================
-void loop(){
-
- ButtonRead();
-
- MenuUpdate();
-
- Extern_Span();
-
- if (WIFI_ON == 1) { //Wifi Ein
- WiFiClient client = server.available(); // Listen for incoming clients
-
- if (client) { // If a new client connects,
- currentTime = millis();
- previousTime = currentTime;
- Serial.println("New Client."); // print a message out in the serial port
- String currentLine = ""; // make a String to hold incoming data from the client
- while (client.connected() && currentTime - previousTime <= timeoutTime) { // loop while the client's connected
- currentTime = millis();
- if (client.available()) { // if there's bytes to read from the client,
- char c = client.read(); // read a byte, then
- Serial.write(c); // print it out the serial monitor
- header += c;
- if (c == '\n') { // if the byte is a newline character
- // if the current line is blank, you got two newline characters in a row.
- // that's the end of the client HTTP request, so send a response:
- if (currentLine.length() == 0) {
- // HTTP-Header fangen immer mit einem Response-Code an (z.B. HTTP/1.1 200 OK)
- // gefolgt vom Content-Type damit der Client weiss was folgt, gefolgt von einer Leerzeile:
- client.println("HTTP/1.1 200 OK");
- client.println("Content-type:text/html");
- client.println("Connection: close");
- client.println();
-
- // Webseiten Eingaben abfragen
-
- //GET /?value=180& HTTP/1.1
- if(header.indexOf("GET /?Pos0=")>=0) {
- pos1 = header.indexOf('=');
- pos2 = header.indexOf('&');
- valueString = header.substring(pos1+1, pos2);
- servo_pos[0] = (valueString.toInt());
- }
- if(header.indexOf("GET /?Pos1=")>=0) {
- pos1 = header.indexOf('=');
- pos2 = header.indexOf('&');
- valueString = header.substring(pos1+1, pos2);
- servo_pos[1] = (valueString.toInt());
- }
- if(header.indexOf("GET /?Pos2=")>=0) {
- pos1 = header.indexOf('=');
- pos2 = header.indexOf('&');
- valueString = header.substring(pos1+1, pos2);
- servo_pos[2] = (valueString.toInt());
- }
- if(header.indexOf("GET /?Pos3=")>=0) {
- pos1 = header.indexOf('=');
- pos2 = header.indexOf('&');
- valueString = header.substring(pos1+1, pos2);
- servo_pos[3] = (valueString.toInt());
- }
- if(header.indexOf("GET /?Pos4=")>=0) {
- pos1 = header.indexOf('=');
- pos2 = header.indexOf('&');
- valueString = header.substring(pos1+1, pos2);
- servo_pos[4] = (valueString.toInt());
- }
- if(header.indexOf("GET /?Set1=")>=0) {
- pos1 = header.indexOf('=');
- pos2 = header.indexOf('&');
- valueString = header.substring(pos1+1, pos2);
- SERVO_STEPS = (valueString.toInt());
- }
- if(header.indexOf("GET /?Set2=")>=0) {
- pos1 = header.indexOf('=');
- pos2 = header.indexOf('&');
- valueString = header.substring(pos1+1, pos2);
- SERVO_MAX = (valueString.toInt());
- }
- if(header.indexOf("GET /?Set3=")>=0) {
- pos1 = header.indexOf('=');
- pos2 = header.indexOf('&');
- valueString = header.substring(pos1+1, pos2);
- SERVO_MIN = (valueString.toInt());
- }
- if(header.indexOf("GET /?Set4=")>=0) {
- pos1 = header.indexOf('=');
- pos2 = header.indexOf('&');
- valueString = header.substring(pos1+1, pos2);
- if (valueString.toInt() > SERVO_MIN){ //Nur übernehmen wenn > MIN
- SERVO_Mitte = (valueString.toInt());
- }
- }
- if(header.indexOf("GET /?Set5=")>=0) {
- pos1 = header.indexOf('=');
- pos2 = header.indexOf('&');
- valueString = header.substring(pos1+1, pos2);
- SERVO_Hz = (valueString.toInt());
- }
- if(header.indexOf("GET /?Speed=")>=0) {
- pos1 = header.indexOf('=');
- pos2 = header.indexOf('&');
- valueString = header.substring(pos1+1, pos2);
- TimeAuto = (valueString.toInt());
- }
- if (header.indexOf("GET /mitte1/on") >= 0)
- {
- servo_pos[0] = SERVO_Mitte; //Mitte
- }
- if (header.indexOf("GET /mitte2/on") >= 0)
- {
- servo_pos[1] = SERVO_Mitte; //Mitte
- }
- if (header.indexOf("GET /mitte3/on") >= 0)
- {
- servo_pos[2] = SERVO_Mitte; //Mitte
- }
- if (header.indexOf("GET /mitte4/on") >= 0)
- {
- servo_pos[3] = SERVO_Mitte; //Mitte
- }
- if (header.indexOf("GET /mitte5/on") >= 0)
- {
- servo_pos[4] = SERVO_Mitte; //Mitte
- }
- if (header.indexOf("GET /back/on") >= 0)
- {
- Menu = Servotester_Auswahl;
- }
- if (header.indexOf("GET /10/on") >= 0)
- {
- Menu = Servotester_Menu;
- }
- if (header.indexOf("GET /20/on") >= 0)
- {
- Menu = Automatik_Modus_Menu;
- }
- if (header.indexOf("GET /30/on") >= 0)
- {
- Menu = Impuls_lesen_Menu;
- }
- if (header.indexOf("GET /40/on") >= 0)
- {
- Menu = Multiswitch_lesen_Menu;
- }
- if (header.indexOf("GET /50/on") >= 0)
- {
- Menu = SBUS_lesen_Menu;
- }
- if (header.indexOf("GET /60/on") >= 0)
- {
- Menu = Einstellung_Menu;
- }
- if (header.indexOf("GET /save/on") >= 0)
- {
- EEprom_Save();
- }
- if (header.indexOf("GET /pause/on") >= 0)
- {
- if(Auto_Pause){
- Auto_Pause=false;
- }
- else
- {
- Auto_Pause=true;
- }
- }
-
- //HTML Seite angezeigen:
- client.println("");
- //client.println("");
- client.println("");
- client.println("");
- // CSS zum Stylen der Ein/Aus-Schaltflächen
- // Fühlen Sie sich frei, die Attribute für Hintergrundfarbe und Schriftgröße nach Ihren Wünschen zu ändern
- client.println("");
-
- // Webseiten-Überschrift
- client.println("Servotester Deluxe
");
-
- switch (Menu) {
- case Servotester_Menu:
- client.println("Servotester
");
- //Servo1
- valueString = String(servo_pos[0], DEC);
-
- client.println("Servo 1 Mikrosekunden : " + valueString + "");
- client.println("
");
-
- client.println("");
-
- client.println("");
- //Servo2
- valueString = String(servo_pos[1], DEC);
-
- client.println("Servo 2 Mikrosekunden : " + valueString + "");
- client.println("");
-
- client.println("");
-
- client.println("");
- //Servo3
- valueString = String(servo_pos[2], DEC);
-
- client.println("
Servo 3 Mikrosekunden : " + valueString + "");
- client.println("");
-
- client.println("");
-
- client.println("");
- //Servo4
- valueString = String(servo_pos[3], DEC);
-
- client.println("
Servo 4 Mikrosekunden : " + valueString + "");
- client.println("");
-
- client.println("");
-
- client.println("");
- //Servo5
- valueString = String(servo_pos[4], DEC);
-
- client.println("
Servo 5 Mikrosekunden : " + valueString + "");
- client.println("");
-
- client.println("");
-
- client.println("");
- //Button erstellen und link zum aufrufen erstellen
-
- client.println("
");
-
- break;
-
- case Automatik_Modus_Menu:
- client.println("Automatik Modus
");
-
- valueString = String(TimeAuto, DEC);
-
- client.println("Servo Geschwindigkeit : " + valueString + "");
-
- client.println("");
-
- client.println("");
-
- client.println("
");
- client.println("
");
- break;
-
- case Einstellung_Menu:
- client.println("Einstellung
");
-
- valueString = String(SERVO_STEPS, DEC);
-
- client.println("Servo Steps : " + valueString + "");
- client.println("");
-
- client.println("");
-
- valueString = String(SERVO_MAX, DEC);
-
- client.println("
Servo MAX : " + valueString + "");
- client.println("");
-
- client.println("");
-
- valueString = String(SERVO_MIN, DEC);
-
- client.println("
Servo MIN : " + valueString + "");
- client.println("");
-
- client.println("");
-
- valueString = String(SERVO_Mitte, DEC);
-
- client.println("
Servo Mitte : " + valueString + "");
- client.println("");
-
- client.println("");
-
- valueString = String(SERVO_Hz, DEC);
-
- client.println("
Servo Hz : " + valueString + "");
- client.println("");
-
- client.println("");
-
-
- client.println("
");
- client.println("
");
- break;
-
- default:
- client.println("Menu
");
- client.println("
");
- client.println("
");
- client.println("
");
- client.println("
");
- client.println("
");
- client.println("
");
- break; // Wird nicht benötigt, wenn Statement(s) vorhanden sind
- }
-
- client.println("