Question about using roboclaw v5 with arduino uno r3

Questions about using encoders with the Roboclaw product line
Post Reply
muhaha2015
Posts: 5
Joined: Thu Oct 06, 2016 6:41 am
Question about using roboclaw v5 with arduino uno r3

Post by muhaha2015 »

Hello,
I have some question about using roboclaw v5 with arduino uno r3 to read quadrature encoder signal.
I try using the roboclaw arduino example "PacketSerialEncoderRead" but never get it work.
I read the ENCODER part of the roboclaw manual and followed the setup in page 57.
Then downloaded the robot claw arduino example directly from your website.
I found the the example from the manual page 75 is quite different from the examples from the website.
Which use BMSerial library instead of SoftwareSerial library.
And I couldn't find the BMSerial.h file in the example folder.
The roboclaw is set to Packet Serial mode with address 128 and baud rate 38400 with firmware 4.1.16
And the arduino serial monitor shows all the reading is "invalid"
But the setup work fine with the version 1.6.6 ION motion control app, I can get the encoder speed and position there.
I don't know what goes wrong, hope you may help please.
Many thanks.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Question about using roboclaw v5 with arduino uno r3

Post by Basicmicro Support »

It takes longer to update the manual than it does to update the example code included with the arduino library. We are in the process of updating the manual now. But in general the examples in the arduino library will always be more up to date than the manual examples. We recently changed the arduino library to take a reference to the serial port class(either software serial or hardware serial) which changed how the examples were written.

Please describe how you have the Roboclaw wired up with the arduino, and how everything is powered as well. Also try using the ReadVersion example and get back to me.

Post Reply