Tzouraguy

RoboLab 4_1 full code

Nov 20th, 2020 (edited)
710
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <Servo.h>
  2.  
  3. Servo my_servo;
  4.  
  5. void setup()
  6. {
  7.   my_servo.attach(6);//Assign pin to component
  8. }
  9.  
  10. void loop()
  11. {
  12.   my_servo.write(0); //Set servo to 0 deg angle
  13.   delay(1000);
  14.   my_servo.write(90); //Set servo to 90 deg angle
  15.   delay(1000);
  16.   my_servo.write(180); //Set servo to 180 deg angle
  17.   delay(1000);
  18. }
Add Comment
Please, Sign In to add comment