OpenMarine

Full Version: How does motor.ino signal a fault
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Trying to learn the arduino code found in the pypilot motor.ino.  When I power up the RPi0  + Arduino Nano, the Nano eventually has a solid green and a rapidly flashing red on it.  The web client shows there's a motor fault (Synch overcurrent fault and bad voltage fault) which I am right now assuming is due to the arduino not being hooked up to anything other than the RPi0 at the moment (baby steps). 

I found myself wondering, how is the rapid flashing red accomplished by code?  Obviously, I see the code that in the loop that flags the error conditions, but what LOC is signaling the detected fault to the Arduino such that it flashes red?  Is it simply by setting non-zero to 'faults'?

Adrian
it is probably the tx or rx that is flashing? If you dont connect A1 to 0v you will get over current faults. Without sensing you probably want to disable voltage and other monitoring in the code by #define at the top.