Created
May 6, 2016 09:51
-
-
Save yazinsai/7f53c37ff9e8821fe79b867669a48010 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Coded by Marjan Olesch | |
Sketch from Insctructables.com | |
Open source - do what you want with this code! | |
*/ | |
#include <Servo.h> | |
int PIN_ESC = 9, value = 0; | |
Servo srvESC; | |
void setup() { | |
srvESC.attach(9); | |
Serial.begin(9600); | |
/* For HobbyKing ESC: | |
- Write '2000' | |
- Wait 4 beeps, then write '700' | |
- Wait a couple of beeps, then write '750' | |
- Now write desired speed, between '755 - 2000' | |
*/ | |
} | |
void loop() { | |
//First connect your ESC WITHOUT Arming. Then Open Serial and follo Instructions | |
srvESC.writeMicroseconds(value); | |
if(Serial.available()) { | |
value = Serial.parseInt(); // Parse an Integer from Serial | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment