I am sending control commands just fine to the Roboclaw 2x5A from an Arduino Mega. I can get the motors to start, change speed and stop just fine with packet serial using the example code provided with the library called PacketSerialEncoderSpeed. The speeds and encoder values look fine in the Windows Roboclaw configuration software but not when reading back the values (like the encoder’s value) from the Roboclaw using 2-way serial from Arduino. I am using the example code provided with the library called PacketSerialEncoderSpeed. When I use a command like ReadEncM1, the valid parameter is only valid about 1 in 1000 times and even then I get a crazy large value like 6003453798787634 with the motors running slowly. It is like this for parameter I try to read from the Roboclaw. Writing all commands works just fine.
I need some help getting good parameter reads back from the Roboclaw please.
Setup:
-Arduino Mega, serial pins connected to 15 and 14.
-I ran the Roboclaw setup program and set the modes to packet serial, 9600 baud.
-Successfully ran calibrations and saved.
-Windows config software says version 1.5 and I used it to update the firmware on the RoboClaw.