TeensyMowerWebControl for esp32

I have been working on a design that should work on PC and mobile phone. You can take a look at it and tell me what you think.
If you make the browser window smaller, the menu at the top disappears and a fold-out button appears.
The design uses Bootstrap and JQuery.
 

Attachments

  • WebControll.zip
    73 KB · Views: 7
Bernard, i am working on it.
My biggest issue is the perimeter signal strength and is variation near the wire.

At first code test i add the perimeterMag right and left (normally the result is 0 if mower axis is upper the wire)and use a PID controler to manage the 2 wheel speed

But the signal strength only change when a coil is at -+5 cm directly over the wire (With 20 cm between the 2 coils it is not OK for docking with accuracy.

The actual code (Counter clock wise tracking) , use the right coil and the left one is here only to help to find a 90 deg IN angle but not utility on 90 deg OUT.

it work well but i think it's possible to do better.
 
Bernard,

what exactly do you want to do?
Do you want to display the mqtt signals on the website?
Do you want to send mqtt signals from the web page to the mower?

Yes, the problem is that pfod only takes into account strings between { and }.
You could wrap the line01 in pfod.cpp between { and }
 
I have been working on a design that should work on PC and mobile phone. You can take a look at it and tell me what you think.
If you make the browser window smaller, the menu at the top disappears and a fold-out button appears.
The design uses Bootstrap and JQuery.
Ich finde es heute (Ist-Stand) umständlich über mehrere Menüstufen vor und zurück gehen zu müssen um Befehle auszuführen. Z.B. sollte bei jedem settings-menü gleich der save-button beinhaltet sein (was sehr einfach ist). Daher ist es eine gute Idee, einen Menü-Button zu haben. Was dein Vorschlag für Auswirkungen hat, kann ich im Moment nicht überblicken. Man könnte natürlich grundsätzlich nicht eine Stufe zurück springen (Ist-Stand) sondern zu einem "Großen"-Menü, das ginge mit einer einzigen Seite.

Ein anderer Punkt ist die Mechanik der Datenaktualisierung. Ich hatte bereits eine Alternative des Webservers angefangen zu programmieren, bei der der Mäher, bei jeder Aktualsierung die Daten an den esp sendet, der diese zwischenspeichert. Der esp kann dann die Abfragen abarbeiten ohne beim Mäher anzufragen. Dafür müßte aber die gesamte Programmierung angepaßt werden - Sensordaten auslesen und gleich weiterreichen.
Da der Teensy aber so schnell ist, braucht man sich die Arbeit nicht zu machen. Ich glaube nicht, daß der esp32 dadurch entlastet würde.
 
Bernard,

just to see what is possible:

in pfod.cpp:

void RemoteControl::sendBumperMenu(boolean update) {
if (update) serialPort->print("{:"); else serialPort->print(F("{.Bumper`1000"));
serialPort->print(F("|b00~Bumper Use "));
sendYesNo(robot->bumperUse);
serialPort->println(F("|b01~Counter l, r "));
serialPort->print(robot->bumperLeftCounter);
serialPort->print(", ");
serialPort->print(robot->bumperRightCounter);
#if defined(DUE)
serialPort->println(F("|b02~Value l, r "));
serialPort->print(robot->bumperLeft);
serialPort->print(", ");
serialPort->print(robot->bumperRight);
#endif
serialPort->println(F("|b03~Button Use "));
sendYesNo(robot->buttonUse);
serialPort->println();

Serial.println("#SENDER,12345,abcd#");
//serialPort->println(F("#SENDER,12345,abcd#")); //Solution1 <- simulating command
serialPort->println(F("#SENDER,12345,abcd")); //Solution2 <- simulating command
serialPort->println();
serialPort->println("}");
}

You can now see the mqtt-commandos in the esp32-console.


Gruß Fürst Ruprecht
 

Attachments

  • Solutuion1and2.zip
    600.9 KB · Views: 2
Bernard,

what exactly do you want to do?
Do you want to display the mqtt signals on the website?
Do you want to send mqtt signals from the web page to the mower?

Yes, the problem is that pfod only takes into account strings between { and }.
You could wrap the line01 in pfod.cpp between { and }
Not exactly Mqtt value are read from Serial_ESP_to_PCB and directly send to mqtt broker and same in the opposite direction (void receivedCallback( ....).

I take a look if i need to include this in a pfod command like you suggest.

For info the test main is only build for dev test.
 
Current status as of 06.05.2022:

- WebServer New: with OTA, added by sascha
- pfod.cpp and pfod.h New: small changes in "#include"-instruction of libraries

Gruß Fürst Ruprecht
 

Attachments

  • TeensyMowerWebControl_ESP32_06052022_OTA.zip
    300.9 KB · Views: 2
  • teensymower-pfod-06052022.zip
    20.4 KB · Views: 2
  • HowTo_EspWebserver_Console_06052022.txt
    3.1 KB · Views: 7
The GPS data are not yet displayed and are only placeholders?

I've been thinking about the layout and distribution for the last few days, but somehow I'm lacking ideas.
 
For GPS visualisation :
You need to use the last version :Teensy005 and replace talker.py by the one on Git.
home/pi/Documents/PiArdumower/pynmea2/types.

There is a bug in the localisation graph ( negative number ??) and i need to add the .ubx file into gpsdata.
I think i did it this week end.

Need certainly 10 minutes before you can see the first data in the GPS Page .
 
the livedata section is still taking over from azurit on due.
at the moment i'm working on the integration of an sd card.
This would allow the html files to be saved on an sd card and the bluetooth function to be integrated.
this also opens up the possibility of debugging on the sd card.
 
The GPS data are not yet displayed and are only placeholders?

I've been thinking about the layout and distribution for the last few days, but somehow I'm lacking ideas.
You don't need to add a page for that, Actualy GPS don't use any setting
 
The GPS data are not yet displayed and are only placeholders?

I've been thinking about the layout and distribution for the last few days, but somehow I'm lacking ideas.
first write down what bothers you about today's solution or what doesn't work or what is missing
 
the livedata section is still taking over from azurit on due.
at the moment i'm working on the integration of an sd card.
This would allow the html files to be saved on an sd card and the bluetooth function to be integrated.
this also opens up the possibility of debugging on the sd card.
Last week My test on DUE with html_line fail if textmax > 500
 
Also it is important to test what's append when ESP32 is far from acces point and lost com , So need a lot of real test.
 
I mean the Settings->GPS page in the web control. There are the columns: HDOP,Satellites,Speed etc. Nothing is displayed there.

I just wanted to see if I can receive GPS data with the Neo M6 in the housing when the Mower drive in the garden.
 
Last week My test on DUE with html_line fail if textmax > 500
if the processing time for the pfod.ccp is too high, the timing of the due will crash. We could further optimize the ShowMessage() by only sending a minimal message packet. At the moment I don't know how to restrict the package (beginning to end) because it is not determined how many lines are generated between the calls to pfod
I mean the Settings->GPS page in the web control. There are the columns: HDOP,Satellites,Speed etc. Nothing is displayed there.

I just wanted to see if I can receive GPS data with the Neo M6 in the housing when the Mower drive in the garden.
ich schicke Dir (bis spätestens morgen) den code aus meiner azurit-Lösung. Da wird alles angezeigt, was das gps-modul hergibt.
 
Current status as of 06.05.2022:

- WebServer New: with OTA, added by sascha
New: you can save the html-files for the WebServer on SD-Card.

HowTo:
Save all files and subdirectories in the /data folder on the pc in the root directory of the sd card.
For example, c:/TeensyMowerWebControl_ESP32_06052022_OTA_SD/data/index.html becomes SD_Card: /index.html
If the esp32 has an sd card, it automatically takes the data, preferably from the sd card, otherwise from the SPIFFS.
If there is no SD card, it takes the data from the SPIFFS.
You can write the data to the SPIFFS and save it to the SD card at the same time.


Gruß Fürst Ruprecht
 

Attachments

  • TeensyMowerWebControl_ESP32_06052022_OTA_SD.zip
    302 KB · Views: 3
the Neo M6 in the housing
On my code you need to change the nmea sentence (I use M8N).
But i never test.
Take a look at start of GPS.cpp
Code:
#include "gps.h"

#define _GPRMC_TERM   "GNRMC" //for m6n use GPRMC
#define _GPGGA_TERM   "GNGGA"  //for m6n use GPGGA
and use this instead
Code:
#include "gps.h"

#define _GPRMC_TERM   "GPRMC" //for m6n use GPRMC
#define _GPGGA_TERM   "GPGGA"  //for m6n use GPGGA
 
Back
Top