Slexy.org is shutting down and stopped accepting new Pastes on May 4th, 2021.
Existing Pastes will stop being available on or after May 10th, 2021.
Author: Not specified Language: cpp
Description: Not specified Timestamp: 2017-09-26 12:30:04 +0000
View raw paste Reply
  1. int servoPin = 3;
  2. Servo servo;
  3.  
  4.  
  5. void setup()
  6. {
  7.  
  8.   servo.attach(3);
  9.   servo.write(90);
  10.   Serial.begin(9600);
  11.  
  12. }
  13.  
  14. void loop() {
  15.  
  16.  
  17.     servo.write(0); //servo droite/gauche
  18.     delay(2000);
  19.    
  20.     servo.write(90); //servo au centre
  21.     delay(2000);
  22.        
  23.     servo.write(180); //servo gauche/droite
  24.     delay(2000);
  25.  
  26.    
  27.   }
  28.  
  29. delay(100);
  30.  
  31.  
  32. }
  33.  
View raw paste Reply