Page 1 of 1

Slave serial RoboClaw motor control

Posted: Thu Feb 07, 2019 10:54 am
by Eoghan Killalea
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

Re: Slave serial RoboClaw motor control

Posted: Fri Feb 08, 2019 10:38 am
by Basicmicro Support
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.