Sunray / PI / Teensy

Bernard

Well-known member
Staff member
Here you can find my work on the adaptation of SUNRAY firmware for teensy pcb:
From the excellent work of Alexander https://forum.ardumower.de/members/alexanderg.14267/

Repos link: https://github.com/Boilevin/Sunray_TeensyPcb

and the Raspberry PI interface

Repos link: https://github.com/Boilevin/PiArdu-for-Sunray

Without Raspberry:
You use the Sunray APP to manage all the mower over the esp32 BLE .
Max 10 maps

With Raspbery:
You use Sunray APP to create the map and upload it into Rover.
From PiSunray main screen:
main00.png
and map menu:
You can now import the map in the raspberry.
Max 99 House with 9 map on each house.
maps00.pngmaps01.png

The timer page can start mowing on the house and map you want:
timer00.png

Manual page can drive mower (same as azuritber):
manual00.png

On auto page you can see the location on mower in the map and the actual process running:
auto00.png

And using house view you can see the 99 possible house , double click on one map upload it in the rover to start it.
auto01.png
 
Last edited:
Great work Bernard!
The information of the location of the mower you wrote "On auto page you can see the location on mower in the map and the actual process running:" is GPS-RTK based or ODO metrie based?
 
It's RTK location at +/- 2 cm when you have a fix.
Odometry and IMU are used to check some error on small movement or when you have a float rtk location.

I try to make a screen video capture of the working mode for easy understanding how it's work when i have time
 
Hi Bernard, Thank you for this great work.
I try to compile your code with VS code and when I change the driver (ZS-X11H), I Have theses errors.

Can you Help me ?
Thank you

src\src\driver\TeensyRobotDriver.cpp:578:19: error: 'pinMotorRightFault' was not declared in this scope; did you mean 'pinMotorRightEnable'?
578 | if (digitalRead(pinMotorRightFault) == gearsDriverChip.faultActive)
| ^~~~~~~~~~~~~~~~~~
| pinMotorRightEnable
src\src\driver\TeensyRobotDriver.cpp:582:19: error: 'pinMotorMowFault' was not declared in this scope; did you mean 'pinMotorMowEnable'?
582 | if (digitalRead(pinMotorMowFault) == mowDriverChip.faultActive)
| ^~~~~~~~~~~~~~~~
| pinMotorMowEnable
src\src\driver\TeensyRobotDriver.cpp: In member function 'virtual void AmMotorDriver::resetMotorFaults()':
src\src\driver\TeensyRobotDriver.cpp:594:19: error: 'pinMotorLeftFault' was not declared in this scope; did you mean 'pinMotorLeftEnable'?
594 | if (digitalRead(pinMotorLeftFault) == gearsDriverChip.faultActive)
| ^~~~~~~~~~~~~~~~~
| pinMotorLeftEnable
src\src\driver\TeensyRobotDriver.cpp:602:19: error: 'pinMotorRightFault' was not declared in this scope; did you mean 'pinMotorRightEnable'?
602 | if (digitalRead(pinMotorRightFault) == gearsDriverChip.faultActive)
| ^~~~~~~~~~~~~~~~~~
| pinMotorRightEnable
src\src\driver\TeensyRobotDriver.cpp:610:19: error: 'pinMotorMowFault' was not declared in this scope; did you mean 'pinMotorMowEnable'?
610 | if (digitalRead(pinMotorMowFault) == mowDriverChip.faultActive)
| ^~~~~~~~~~~~~~~~
| pinMotorMowEnable
*** [.pio\build\teensy41\src\src\driver\TeensyRobotDriver.cpp.o] Error 1
 
Hi Bernard, Thank you for this great work.
I try to compile your code with VS code and when I change the driver (ZS-X11H), I Have theses errors.

Can you Help me ?
Thank you

src\src\driver\TeensyRobotDriver.cpp:578:19: error: 'pinMotorRightFault' was not declared in this scope; did you mean 'pinMotorRightEnable'?
578 | if (digitalRead(pinMotorRightFault) == gearsDriverChip.faultActive)
| ^~~~~~~~~~~~~~~~~~
| pinMotorRightEnable
src\src\driver\TeensyRobotDriver.cpp:582:19: error: 'pinMotorMowFault' was not declared in this scope; did you mean 'pinMotorMowEnable'?
582 | if (digitalRead(pinMotorMowFault) == mowDriverChip.faultActive)
| ^~~~~~~~~~~~~~~~
| pinMotorMowEnable
src\src\driver\TeensyRobotDriver.cpp: In member function 'virtual void AmMotorDriver::resetMotorFaults()':
src\src\driver\TeensyRobotDriver.cpp:594:19: error: 'pinMotorLeftFault' was not declared in this scope; did you mean 'pinMotorLeftEnable'?
594 | if (digitalRead(pinMotorLeftFault) == gearsDriverChip.faultActive)
| ^~~~~~~~~~~~~~~~~
| pinMotorLeftEnable
src\src\driver\TeensyRobotDriver.cpp:602:19: error: 'pinMotorRightFault' was not declared in this scope; did you mean 'pinMotorRightEnable'?
602 | if (digitalRead(pinMotorRightFault) == gearsDriverChip.faultActive)
| ^~~~~~~~~~~~~~~~~~
| pinMotorRightEnable
src\src\driver\TeensyRobotDriver.cpp:610:19: error: 'pinMotorMowFault' was not declared in this scope; did you mean 'pinMotorMowEnable'?
610 | if (digitalRead(pinMotorMowFault) == mowDriverChip.faultActive)
| ^~~~~~~~~~~~~~~~
| pinMotorMowEnable
*** [.pio\build\teensy41\src\src\driver\TeensyRobotDriver.cpp.o] Error 1
I never test the teensy code with ZSX11 driver, But to solve this compile error, you can simply delete all the code into the
void AmMotorDriver::resetMotorFaults(){
But can you show your change in the config.h (there is no ZS-X11H option ??? or i have not update github ??
 
Thank you for your response.
Regarding this post :
I use the JYQD driver.
 

Attachments

Thank you for your response.
Regarding this post :
I use the JYQD driver.
OK.
But you need to go deeper in the code and adjust according your wiring between driver and mainPCB.
Also be careful with VS code compilation issue in last version .

What is the platform and motor ?
 
Back
Top