Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Coded by Marjan Olesch
- Sketch from Insctructables.com
- Open source - do what you want with this code!
- */
- #include <Servo.h>
- int value = 0; // set values you need to zero
- int fst =1;
- Servo firstESC, secondESC; //Create as much as Servoobject you want. You can controll 2 or more Servos at the same time
- void setup() {
- firstESC.attach(9); // attached to pin 9 I just do this with 1 Servo
- Serial.begin(9600); // start serial at 9600 baud
- }
- void loop() {
- //First connect your ESC WITHOUT Arming. Then Open Serial and follo Instructions
- Serial.println(value);
- //firstESC.writeMicroseconds(850);
- //firstESC.writeMicroseconds(950);
- //firstESC.writeMicroseconds(1150);
- //firstESC.writeMicroseconds(850);
- if(Serial.available())
- value = Serial.parseInt(); // Parse an Integer from Serial
- firstESC.writeMicroseconds(value);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement