Controlling speed controllers with Arduino

Hey guys, I’m back with another instructable. This is about RC speed controllers. What this will do is allow you to test out your speed controller in the Arduino world using Serial, then you write the values down and can use them for your projects.
Submitted by Newton Labs for the Instructables Sponsorship Program
Controlling speed controllers with Arduino

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 [email protected]
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

Leave a Comment

Your email address will not be published. Required fields are marked *

*
= 4 + 5

(Spamcheck Enabled)

Scroll to Top