Erratic USB mode connection

General discussion of using Roboclaw motor controllers
Post Reply
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Erratic USB mode connection

Post by Basicmicro Support »

Are you using your own code from scratch or are you using our Arduino library or Python library? In all cases you should enable acks so you can detect when a command is not properly received. When the checksum is not valid the Roboclaw will ignore the command. Without the acks you dont know it ignored the command and cant resend the command.

With your own code you need to set the 8th bit(bit 7) of the checksum byte. This will let the Roboclaw know you want an ack when you send a write comand(eg one that you send a checksum byte to). The Roboclaw will send back a 0xFF ack byte if it received the command, it has a valid checksum and the command was addressed to it(eg had the right address byte).

Note the new release of the Roboclaw firmware(out later this week) replaces the checksum with a CRC16(documented in the new manual which is the reason the release is delayed until later this week) and the ack option is now always enabled(not optional anymore).

Post Reply