Position Control

Questions about using encoders with the Roboclaw product line
Post Reply
Posts: 1
Joined: Wed Aug 07, 2019 7:43 am

Position Control

Post by rohmer » Wed Aug 07, 2019 7:46 am

I converted the Arduino library to WiringPi/Arduino.

In writing a driver specific to my task, I need to send position/speed.

Using SpeedDistanceM1M2, I need to go backwards, and reading various topics it says send a position of a negative number, yet the method signature is a uint32_t (Unsigned).

Is this a bug in the Arduino library or am I missing something

User avatar
Basicmicro Support
Posts: 1441
Joined: Thu Feb 26, 2015 9:45 pm

Re: Position Control

Post by Basicmicro Support » Wed Aug 07, 2019 9:52 am

Yes. Still send a negative number for reverse. It is converted to an unsigned value so that there are no odd sign conversions when sending the individual bytes of the position value over the serial port. The sign bit will still transmit to the Roboclaw which does use a signed variable.

Post Reply