TeensyMowerWebControl for esp32

Fürst Ruprecht

Well-known member
Current status 05.06.2022
















Hallo Rasen-Mäher,

ich habe anhand der pfod.ccp eine erste Version = 15.03.2022 der WebServer-Lösung für esp32 angefertigt.
Leider läuft mein Protopy3-Mäher noch nicht, daher kann ich nur im Stillstand testen.
Es gibt sicherlich noch Fehler. Daher wäre ich Euch dankbar, wenn Ihr sie hier aufzeigen könntet.
Die Plot-Funktion funktioniert hier noch nicht. Ich hatte für die azurit-Version der Software bereits eine andere Lösung erarbeitet.
Diese erfordert aber eine Anpassung der pfod.ccp, die ich nicht ohne Bernard machen möchte.
Für das Ausdrucken auf "Console" fehlt mir im Moment der Lösungsansatz - kommt vielleicht noch später.
Am esp32 wird TX0/RX0 verwendet (kann natürlich auch angepaßt werden), Baudrate ist 115200.

siehe mower.h
#define Bluetooth Serial5 // Ardumower default OK for ESP32 or HC05 //Serial5 ist in meinem Fall der Anschluß am Teensy
#define BLUETOOTH_BAUDRATE 115200

Gruß Fürst Ruprecht
 

Attachments

  • teensymower-pfod-06052022.zip
    20.4 KB · Views: 3
  • TeensyMowerWebControl_ESP32_06052022_OTA.zip
    300.9 KB · Views: 4
  • HowTo_EspWebserver_Console_06052022.txt
    3.1 KB · Views: 4
Last edited:
Moin,
ich kann zur Zeit nicht testen, meine PowerPCB ist kaputt. Muss mir erst mal eine neue machen.
Aber dann werde ich mir das sicherlich mal ansehen.
 
Hi.
I have error on startup SPIFFS: mount failed maybe i forget to copy some file inside spiff .
But how to do ?
[WSB] ESP32 Serial WIFI Bridge with Webinterface for AzuritBer ! (not azurit) vom 15.03.2022
[WSB] Connecting with programmed settings
....................
Wifi Reconnect

esp_wifi_set_ps = 0
.E (13802) SPIFFS: mount failed, -10025
 
Das probiere ich gerne einmal aus...

Fragen habe ich trotzdem:
siehe mower.h
#define Bluetooth Serial5 // Ardumower default OK for ESP32 or HC05 //Serial5 ist in meinem Fall der Anschluß am Teensy
#define BLUETOOTH_BAUDRATE 115200
Baudrate muss geändert werden, aber bei Serial habe ich 2 stehen, muss ich das auch ändern?

Anschluss am Bluetooth-Anschluss??
 
Irgendetwas klappt nicht.
Das Modul verbindet sich mit dem Netzwerk, jedoch dauert es sehr lange bis sich eine Seite öffnet, oft passiert auch garnichts... (ohne Mower, nur an USB-Power)

Über PFOD-App steht connected, jedoch öffnet sich nichts und es kommt der Timeout. (Über USB und ohne Mower ist das wohl normal.)

Angeschlossen im Mower bekomme ich per USB-Kabel keine Daten in der Arduino-Console. Auch öffnet sich die MowerWebControl Seite nicht.

Auch ohne USB-Kabel klappt es nicht.

Auch im Mower angeschlossen bekomme ich keine Daten... Bin ich an den falschen RX/TX pins???
 
Quelque chose ne fonctionne pas.
Le module se connecte au réseau, mais il faut beaucoup de temps pour qu’une page s’ouvre, souvent rien ne se passe... (sans tondeuse, uniquement sur alimentation USB)

Via l’application PFOD est connecté, mais rien ne s’ouvre et le délai d’expiration arrive. (Via USB et sans tondeuse, c’est probablement normal.)

Connecté dans la tondeuse, j’obtiens via un câble USB aucune donnée dans la console Arduino. En outre, la page MowerWebControl ne s’ouvre pas.

Même sans câble USB, cela ne fonctionne pas.

Aussi connecté dans la tondeuse je n’obtiens pas de données... Suis-je sur les mauvaises broches RX/TX ???
My test show a good result , But i actually use the Raspberry UI and PFOD over WIFI.
@SefanH This firmware is build for Teensy , not for PCB1.3/4 and arduino !
 
So, here is my new version of the esp32 web server.

There was a small error with the "Ticks per cm" in Odometry Settings. I have fixed it.

The biggest change is the output of information on the web page "Console", which is otherwise only output in the Arduino console.
ShowMessage() is used for this. The function then sends the data to the Arduino console and simultaneously to the web server via pfod.cpp.

Please pay attention to the parameters for the sliders in pfod.cpp. They may deviate from the standard, as they have been adapted for the stepper motors - I have not checked this now.

Gruß Fürst Ruprecht

Console.JPG
 

Attachments

  • WebServer_with_Output_from_Console.zip
    463.3 KB · Views: 9
I reworked the function for "Console" again. Now each line starts with the time. If the maximum number of characters is exceeded, the first line is deleted. (scrolling text)
 
TeensyMowerWebControl for esp32 for any wifi enabled terminal.
Changes: Serial Connection can be selected.

I ask for verification.
Gruß Fürst Ruprecht
 

Attachments

  • TeensyMowerWebControl_ESP32_28042022.zip
    299.5 KB · Views: 4
I add it and now i have the connection .
Code:
void setup() {
  // Configure Serial Port
  Serial_ESP_to_USB.begin(BAUDRATE);
  Serial_ESP_to_USB.setTimeout(500);
  Serial_ESP_to_PCB.begin(BAUDRATE);
  Serial_ESP_to_PCB.setTimeout(500);
  // Configure LED
  pinMode(LED, OUTPUT);
  setLedSequence(ledSeq_startup);
  ledTicker.attach(0.1, onLedTicker);
 
Console fail using PFOD with your function (Work on webserver)

Code:
void RemoteControl::sendConsoleMenu(boolean update) {
  if (update) serialPort->print("{:"); else serialPort->print(F("{.Console`500"));   
  serialPort->println(F("|TextConsole~  "));
  serialPort->print(robot->html_line);   
  serialPort->println("}");
}

I need to use this one instead: (OK for PFOD but not on webserver)

Code:
void RemoteControl::sendConsoleMenu(boolean update) {
  if (update) serialPort->print("{:"); else serialPort->print(F("{.Console`2000"));
  serialPort->println(F("|C00~TextConsole :<-6> "));
  serialPort->print(robot->html_line);
  serialPort->println("</-6>}");
}

The <-6> is use to reduce the police size

Do you thing it's possible to adjust the webserver to the new syntax ?
 
I actually test on AZURITBER Dev 1.85 / PCB1.3 and ESP32 connected on serial2
It's OK except the console and i see the new live data ,but still in dev i suppose ?
 
i have a problem compiling your code:
C:\Users\...\AppData\Local\Temp\arduino_build_427817\sketch/robot.cpp:1586: undefined reference to `_reboot_Teensyduino_'
collect2.exe: error: ld returned 1 exit status
 
Back
Top