Mode 40 which is Speed Accel Mixed does not seem to work

General discussion of using Roboclaw motor controllers
Post Reply
dclendenin
Posts: 1
Joined: Fri Oct 23, 2015 1:14 pm

Mode 40 which is Speed Accel Mixed does not seem to work

Post by dclendenin » Fri Oct 23, 2015 1:25 pm

It appears that using the Arduino library does not work in at least the mode 40 Speed Accel M1M2, but when using the _2 version which is slightly different in construction, i.e. you have to put in two accelerations versus one. For example the original mode 40 was roboclaw.SpeedAccelM1M2(address,ACCEL, MOTORSPEED, MOTORSPEED); and what works is roboclaw.SpeedAccelM1M2_2(address, ACCEL, MOTORSPEED, ACCEL, MOTORSPEED);
As I was looking at the cpp code to see what might be the matter I found the two different constructs and also noted that the apparent address in the cpp duplicated some numbers of other instructions to the Roboclaw boards. The board I am using is the Roboclaw 2x5A.
What caused this was I tried the example code with changing from a single motor roboclaw.SpeedAccelM1(address,ACCEL, MOTORSPEED); to the roboclaw.SpeedAccelM1M2(address,ACCEL, MOTORSPEED, MOTORSPEED); and found it did not work.

User avatar
Basicmicro Support
Posts: 1274
Joined: Thu Feb 26, 2015 9:45 pm

Re: Mode 40 which is Speed Accel Mixed does not seem to work

Post by Basicmicro Support » Tue Oct 27, 2015 11:00 am

I think I found the problem. It appears the bug will affect commands 40 and 46(dual motor commands that use a single accel argument). We are working on a minor update which adds support for our 2x7A motor controller. I should have this fixed in that release. Until then you should use either the commands with 2 accel arguments or use the individual speedaccel commands.

Post Reply