-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathFK8ZOX7I8FR64YS.ino
55 lines (45 loc) · 1009 Bytes
/
FK8ZOX7I8FR64YS.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <Servo.h>
Servo rightfoot;
Servo righthigh;
Servo leftfoot;
Servo leftthigh;
int pos;
void setup()
{
rightfoot.attach(3);
righthigh.attach(5);
leftfoot.attach(9);
leftthigh.attach(6);
}
void loop()
{ int pos=120;
rightfoot.write(90);
righthigh.write(90);
leftfoot.write(90);
leftthigh.write(90);delay(500);
leftfoot.write(55);delay(400);
for(int i=90;i<=115;i++)
{rightfoot.write(i);delay(12);}
leftfoot.write(120);delay(100);
leftthigh.write(120);delay(100);
delay(500);
for(int i=90;i<=120;i++)
{righthigh.write(i);delay(12);
leftthigh.write(i);delay(12);}
leftfoot.write(90);delay(300);
for(int i=115;i>=90;i--)
{rightfoot.write(i);delay(12);}
delay(500);
rightfoot.write(120);delay(300);
leftfoot.write(65);
righthigh.write(60);
for(pos=120;pos>=60;pos--)
{leftthigh.write(pos);delay(7);}
rightfoot.write(60);
delay(500);
rightfoot.write(90);delay(300);
leftfoot.write(90);delay(300);
leftthigh.write(60);delay(300);
righthigh.write(60);delay(300);
delay(500);
}