Submitted by Newton Labs for the Instructables Sponsorship Program
Step 1: Setup
All you need to do is hook up your speed controller to your Arduino, red(s)->+5 black/brown(s)->GND yellow/white(s)->10 and/or 9.
Step 2: Programming
// If you need any help feel free to PM me (simonfrfr) or email me
// at newtonlabs@bellsouth.net
String readString;
#include <Servo.h>
Servo myservo; // create servo object to control a servo
Servo myservo2; // create second servo object
const int left = 10; // left motor’s pin on arduino
const int right = 9; // right motor’s pin on arduino
void setup() {
Serial.begin(9600);
Serial.println(“servo-test-22-dual-input”); // so I can keep track of what is loaded
}
void loop() {
while (Serial.available()) {
char c = Serial.read(); //gets one byte from serial buffer
readString += c; //makes the string readString
delay(2); //slow looping to allow buffer to fill with next character
}
For more detail: Controlling speed controllers with Arduino