Related to another post I got a question about communicating with my 2x30A Roboclaw Motor controller.
Initial Post
Datasheet
I decided to face the problems with the Bluefruit device later and came upon another problem I desperatly need help with.
I am using a Mega2560 and the Roboclaw 2x30A Motor Controller. My Sketch includes the Roboclaw.h and the BMSerial.h library. Both to be found as an attachement to my Inital post.
I'm currently communicating with the roboclaw via Packetserial and sending comands to the Controller works just fine. There seems to be a way to get the currents from the motors. I read through the data sheet multiple times and used google but for me as a beginner I couldn't really figure out how to do it exactly.
This is what the data sheet says about getting the currents in Packet Serial mode:
49 - Read Motor Currents
Read the current draw from each motor in 10ma increments. Command syntax:
Send: [Address, 49]
Receive: [M1Cur.Byte1, M1Cur.Byte0, M2Cur.Byte1, M2Cur.Byte0, Checksum]
The command will return 5 bytes. Bytes 1 and 2 combine to represent the current in 10ma increments
of motor1. Bytes 3 and 4 combine to represent the current in 10ma increments of motor2 . Byte 5 is
the checksum
Could someone provide me an example how to exactly send the command and store what I received in two variables?
Thanks!