Advertisement
Guest User

ourcode

a guest
Apr 11th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <Servo.h>
  2.  
  3. byte servoPin = 9;
  4. Servo servo;
  5.  
  6. void setup() {
  7. servo.attach(servoPin);
  8.  
  9. servo.writeMicroseconds(1500); // send "stop" signal to ESC.
  10. delay(3000); // delay to allow the ESC to recognize the stopped signal
  11. }
  12.  
  13. void loop() {
  14. int signal = 1500; // Set signal value, which should be between 1100 and 1900
  15.  
  16. servo.writeMicroseconds(signal); // Send signal to ESC.
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement