Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //insect by MCWorkshop. Code open source
- //Gennaio 2019
- #include <Servo.h>
- Servo myservo1;
- Servo myservo2;
- Servo myservo3;
- Servo myservo4;
- Servo myservo5;
- int pos1 = 90;
- int pos2 = 90;
- int pos3 = 90;
- int pos4 = 90;
- int pos5 = 90;
- void setup() {
- Serial.begin(9600);
- myservo1.attach(3);
- myservo2.attach(5);
- myservo3.attach(6);
- myservo4.attach(9);
- myservo5.attach(10);
- }
- void loop() {
- delay(500);
- myservo1.write (10);
- myservo2.write (80);
- delay (500);
- myservo3.write (10);
- myservo4.write (80);
- delay (1000);
- myservo5.write (40);
- delay (500);
- myservo1.write (80);
- myservo2.write (140);
- delay (500);
- myservo3.write (80);
- myservo4.write (140);
- delay (1000);
- }
RAW Paste Data