Closed aaron4522 closed 2 weeks ago
Seems impractical, as sensors using Arduino.h libraries would need to be rewritten and require significant time. Also Pi does not support any analog input, which means another device is necessary.
Using Pi5 + Microcontroller combo seems much more achievable
Worth revisiting later? Seems possible, but will be a pain. Sticking with the current pi+microcontroller setup will be safer.
Piduino seems to allow Arduino programs to run and compile on Pi: https://github.com/epsilonrt/piduino/wiki/Examples
LibGPIO also works for GPIO: https://github.com/brgl/libgpiod
FrSky Antenna working directly on Pi: https://github.com/alexbirkett/FrPi
Controlling servos through Pi can 'jitter', dedicated PWM board or C++ gpio can fix this?
Analog input from windvane would need a analog->digital converter
Most sensor libraries are implemented in C++ only. We are currently using the Teensy to interface with these sensors and libraries and forwarding that data to the Pi.
Binding C++ code to our Pi Python packages means that we skip using the Teensy entirely and we get to avoid having to rewrite everything in Python. We'd just need to update the pin outs to the Pi's GPIO.
This will be critical for our mini testing boat since the plan is to only have the Pi.