PacketSerialEncoderPosition.ino

Questions about using encoders with the Roboclaw product line
Post Reply
TedRobotBuilder
Posts: 12
Joined: Mon Aug 31, 2015 8:00 am
PacketSerialEncoderPosition.ino

Post by TedRobotBuilder »

When I run this example Arduino sketch, after modifying the pin numbers and serial speeds for my setup, all the robot does is try to hold the current position of motor 1. The motors never turn. This seems odd because PacketSerialEncoderSpeedAccelDistance.ino seems to work fine.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: PacketSerialEncoderPosition.ino

Post by Basicmicro Support »

You need to set the min and max position ranges at the same time you set the PID constants using IonMotion. Then save the settings to the Roboclaws flash(Save Settings in Device menu). If you do not then there range is 0 and 0 which means the motor will not move. The Position commands have soft position limits. The speed commands do not.

Post Reply