No answer to a Serial command

General discussion of using Roboclaw motor controllers
Post Reply
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: No answer to a Serial command

Post by Basicmicro Support »

The SpeedDistance example uses Packet Serial, not Simple Serial. Change the Roboclaw mode to Packet Serial mode.

S2 in Simple serial mode is not used or is Slave Select input which is why it is floating around 2.5v.

In Packet Serial mode S2 is an output form the Roboclaw back to the Pi. If nothing happens on it, it means the Roboclaw never saw a valid packet to acknowledge. This could be due to an incorrect baudrate being selected. Most of the python examples are set to 38400 while the Roboclaw defaults to 115200.

I recommend the diode parallel both the fuse and the power switch. If either opens the diode will provide a path back to the battery for any motor regeneration.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: No answer to a Serial command

Post by Basicmicro Support »

Those a odd behaviors and they sound like they are all on the R-Pi side of the connection. Not matter what happens nothing the Roboclaw does should be able to cause the R-Pi serial port to crash(which is what it sounds like happened on your PI).

Simplify your program to just reading the Roboclaw version information. have it send a GETVERSION command every 100ms or so which will make it easier to see on the scope. Dont do anything else. Take a screen cap of the scope. Please widen the trace to fill the scopes screen so I can see the whole sent and received pacjet clearly.

I did some Googling and found several references to R-Pi and "device report readinees to read...". I did not find any that were intermittent but what I found was thought to be a kernal bug: https://bugs.launchpad.net/ubuntu/+sour ... ug/1501240

Post Reply