Questions about using encoders with the Roboclaw product line
- Posts: 1
- Joined: Fri Oct 05, 2018 6:37 am
I have a problem with the roboclaw 2x7A. I can read Encoders until i use the SpeedAccelDeccelPositionMX command. After that the ReadEncoders function doesn't return valid values.
I post an example code.
Code: Select all
roboclaw.SpeedAccelDeccelPositionM1(address, 10000, 80000, 10000, enc1start, 1);
roboclaw.SpeedAccelDeccelPositionM2(address, 10000, 80000, 10000, enc2start, 1);
roboclaw.ReadEncoders(address, enc1, enc2);
- Posts: 1365
- Joined: Thu Feb 26, 2015 9:45 pm
Please provide a complete working example. Just these four lines of code could be affected by everything else in your program.
Also, I recommend reading the return values and printing their information to the monitor window so we have something to work with.