TeensyMowerWebControl for esp32

Sorry if translate is sometime complex and if i made some mistake on name .
Code compile on my side without error.

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

reboot_teens.. is declare into robot.h
It is use by raspberry PI to reboot the teensy after uploading a new firmware using piardu.

I join the ZIP of the file locate on my PC in case something is wrong with GITHUB.
 

Attachments

  • teensymower.zip
    10.4 MB · Views: 1
Code:
#define DEBUG 1

#ifdef DEBUG

Serial.println(F("START"));

#endif
jow, das kenne ich. Aber in der .h hast Du den ifndef define vor dem eigentlichen code und ganz am Schluß das endif. Wenn Du jetzt dazwischen Dein Debug Beispiel einfügst, dann rafft der compiler das mit dem endif ganz am Schluss nicht mehr.
 
Sorry if translate is sometime complex and if i made some mistake on name .
Code compile on my side without error.



reboot_teens.. is declare into robot.h
It is use by raspberry PI to reboot the teensy after uploading a new firmware using piardu.

I join the ZIP of the file locate on my PC in case something is wrong with GITHUB.
das not work.
i found this: https://forum.pjrc.com/threads/67169-Reset-Teensy-4-1-to-program-mode
So _reboot_Teensyduino_() does not work with Teensy4.1, we should use: asm("bkpt #251"); // run bootloader
 
Gehört die Abfrage nicht in die cpp Datei rein?
I thought I would make a pfod.h and pfod.cpp for Due and Teensy and select the required code parts and libraries via compiler statement.
However, I don't know how to nest compiler statements and whether this is possible at all.
 

Attachments

  • pfod.zip
    1.9 KB · Views: 3
das not work.
i found this: https://forum.pjrc.com/threads/67169-Reset-Teensy-4-1-to-program-mode
So _reboot_Teensyduino_() does not work with Teensy4.1, we should use: asm("bkpt #251"); // run bootloader
It's strange that it compile on my side.
I use arduino ide 1.8.16 and teensyloader is 1.55 beta2 on my PC and teensyloader 1.52 inside the raspberry pi for WIFI firmware update.
Can you tell me what is your config ?

In all case it's work also for me with your suggest ,so no problem:

Code:
void Robot::teensyBootLoader() {
  delayWithWatchdog(8000); //wait for pyteensy to stop and start pi teensy loader
  asm("bkpt #251");
  //_reboot_Teensyduino_();
}
 
I thought I would make a pfod.h and pfod.cpp for Due and Teensy and select the required code parts and libraries via compiler statement.
However, I don't know how to nest compiler statements and whether this is possible at all.
Sorry but i don't understand .
For me pfod.cpp and h into AZURITBER for DUE can't be the same as the one for TEENSY
And for WEB SERVER we also need 2 different version with different html page for setting or 2 or 3 pages.

I need more test to be sure but !!!!!
 
hura, hura, compiling for Teensy is o.k.
Bernard, please check the concept of the files (how I managed the two versions) and my comments.
The html files are not checked
 

Attachments

  • teensymower_Bernard_28042022_pfod_test1.zip
    19.3 KB · Views: 3
It's strange that it compile on my side.
I use arduino ide 1.8.16 and teensyloader is 1.55 beta2 on my PC and teensyloader 1.52 inside the raspberry pi for WIFI firmware update.
Can you tell me what is your config ?

In all case it's work also for me with your suggest ,so no problem:

Code:
void Robot::teensyBootLoader() {
  delayWithWatchdog(8000); //wait for pyteensy to stop and start pi teensy loader
  asm("bkpt #251");
  //_reboot_Teensyduino_();
}
i‘ll send it tomorrow
 
So today I learned that you can nest compiler statements if the other bugs are fixed. Bernard, do you think it makes sense or we can manage to do only one pfod.h and one pfod.ccp for both azuritBer versions (Due/Teensy)?
 
It's strange that it compile on my side.
I use arduino ide 1.8.16 and teensyloader is 1.55 beta2 on my PC and teensyloader 1.52 inside the raspberry pi for WIFI firmware update.
Can you tell me what is your config ?

In all case it's work also for me with your suggest ,so no problem:

Code:
void Robot::teensyBootLoader() {
  delayWithWatchdog(8000); //wait for pyteensy to stop and start pi teensy loader
  asm("bkpt #251");
  //_reboot_Teensyduino_();
}
Teensyloader 1.53
Arduino 1.8.13
 
Maybe it was the reason it's work on my side (arduino ide more recent)
But no problem i have update to your code
 
- wenn charger not connectet + Power OFF PCB (WebControl) => keeps running!
- #define Enable_Screen => later you use it als variable "robot->Enable_Screen = !robot->Enable_Screen;"

I can upload now my stepper-version including pfod last version, no compiler-errors.

I still don't understand the point of mower. In my case I have to adapt a lot of code for the stepper motors and of course for my other hardware. I thought mower was where you define the specific scopes?

Back to pfod.ccp and pfod.h. Can you work with one version and compiler instructions?
 
Back to pfod.ccp and pfod.h. Can you work with one version and compiler instructions?
Not yet tested ,But i don't really understand what you want to do .
You want the same file for Due and teensy , but the html file and web server app need to be differrent ??
Where is define DUE ?
defined(DUE)
 
The compiler does not check if #if define(OBJECT) is true or false, only if it exists. So you only define the OBJECT you need.
Yes, i want the same file for Due end Teensy.

The user only deletes the // before //#define DUE or before //define TEENSY. The rest is done. The html files are the same (if you manage to use the same number of elements (sliders, buttons, outputs). The variables can be different, only the id's must remain the same in order to assign the variables to the elements . This means that there is no difference for the user with regard to the hardware he is using and the instructions for installation are "almost" clear.
 
Hello Bernard,
> serialPort->println(F("|C00~TextConsole :<-6> ")) <
unfortunately does not work. I solved it via compiler statement (my current favourite).

Hello, knights of the green lawn,
enclosed for all who would like to test the current version of pfod.h and pfod.cpp for !!! azuritBer on Due + Teensymower on Teensy4.1. Unfortunately I can only test Teensymower, as I have azurit running on my prototype-2.
Gruß Fürst Ruprecht
 

Attachments

  • TeensyMowerWebControl_ESP32_02052022.zip
    299.6 KB · Views: 4
  • TeensyMowerWebControl_ESP32_02052022.zip
    299.6 KB · Views: 2
Last edited:
Hello Bernard,
> serialPort->println(F("|C00~TextConsole :<-6> ")) <
unfortunately does not work. I solved it via compiler statement (my current favourite).

Hello, knights of the green lawn,
enclosed for all who would like to test the current version of pfod.h and pfod.cpp for !!! azuritBer on Due + Teensymower on Teensy4.1. Unfortunately I can only test Teensymower, as I have azurit running on my prototype-2.
Gruß Fürst Ruprecht
It fail to compile !
Here the AZURITBER DEV code with your pfod include and the initial pfod file, Can you check ?
Capture d’écran 2022-05-01 202429.jpg
 

Attachments

  • azuritberdev.zip
    10.4 MB · Views: 2
Back
Top