mpmcws

Insect

Jan 13th, 2019
89
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //insect by MCWorkshop. Code open source
  2. //Gennaio 2019
  3. #include <Servo.h>
  4. Servo myservo1;
  5. Servo myservo2;
  6. Servo myservo3;
  7. Servo myservo4;
  8. Servo myservo5;
  9. int pos1 = 90;
  10. int pos2 = 90;
  11. int pos3 = 90;
  12. int pos4 = 90;
  13. int pos5 = 90;
  14. void setup() {
  15.   Serial.begin(9600);
  16.   myservo1.attach(3);
  17.   myservo2.attach(5);
  18.   myservo3.attach(6);
  19.   myservo4.attach(9);
  20.   myservo5.attach(10);
  21.  
  22. }
  23. void loop() {
  24.   delay(500);
  25.   myservo1.write (10);
  26.   myservo2.write (80);
  27.     delay (500);
  28.    myservo3.write (10);  
  29.    myservo4.write (80);
  30.     delay (1000);
  31.   myservo5.write (40);
  32.     delay (500);
  33.   myservo1.write (80);
  34.   myservo2.write (140);
  35.    delay (500);
  36.     myservo3.write (80);
  37.     myservo4.write (140);
  38.       delay (1000);
  39. }
RAW Paste Data