Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Servo.h>
- Servo steering;
- Servo throttle;
- int pos = 0;
- void setup()
- {
- steering.attach(9);
- throttle.attach(10);
- }
- void loop()
- {
- throttle.write(100); //sets no throttle, otherwise the ESC goes crazy
- steering.write(90);
- delay(1000);
- throttle.write(90);
- delay(1000);
- throttle.write(100);
- delay(2000);
- throttle.write(80);
- delay(1000);
- throttle.write(100);
- delay(2000);
- throttle.write(70);
- delay(1000);
- throttle.write(100);
- delay(2000);
- throttle.write(60);
- delay(1000);
- throttle.write(100);
- delay(2000);
- throttle.write(50);
- delay(1000);
- throttle.write(100);
- delay(2000);
- throttle.write(40);
- delay(1000);
- throttle.write(100);
- delay(2000);
- // steering.write(55);
- // delay(500);
- // steering.write(90);
- // delay(500);
- // steering.write(125);
- // delay(500);
- // steering.write(90);
- // delay(500);
- // steering.write(90);
- // delay(500);
- // steering.write(125);
- // delay(500);
- // steering.write(90);
- // delay(500);
- // steering.write(55);
- // delay(500);
- // steering.write(90);
- // delay(500);
- // delay(2000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement