Slave serial RoboClaw motor control

General discussion of using Roboclaw motor controllers
Post Reply
Eoghan Killalea
Posts: 5
Joined: Thu Feb 07, 2019 10:44 am

Slave serial RoboClaw motor control

Post by Eoghan Killalea » Thu Feb 07, 2019 10:54 am

Hi, just wondering if anyone could help me, I am trying to control two motors using 2 RoboClaw Solo 30A Motor Controllers, using simple serial and a slave select.

I am using Arduino Uno and have a very simple code which is attached. Also I have attached my layout of my hardware. There is also a screenshot of my Basic Micro Studio screen.

The code seems to ignore the pins 5 and 6 completely, and procededs to turn both motors in the same fashion. I am wondering why this is happening.

Thanks, Eoghan
3.PNG (119.28 KiB) Viewed 870 times
2.PNG (96.78 KiB) Viewed 870 times
1.PNG (17.83 KiB) Viewed 870 times

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

Re: Slave serial RoboClaw motor control

Post by Basicmicro Support » Fri Feb 08, 2019 10:38 am

Your program doesnt set P5 or P6 as outputs as far as I can tell. These pin defualt as inputs. Using the write command on inputs wont do anything to them. You need to use a pinMode function to set the pins as outputs:

pinMode(5, OUTPUT);
pinMode(6, OUTPUT);

Put this in your setup function.

Post Reply