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 | #include <Otto.h>
Otto Otto;
#define LeftLeg 2 // left leg pin, servo[0]
#define RightLeg 3 // right leg pin, servo[1]
#define LeftFoot 4 // left foot pin, servo[2]
#define RightFoot 5 // right foot pin, servo[3]
#define Buzzer 13 //buzzer pin
void setup() {
Otto.init(LeftLeg, RightLeg, LeftFoot, RightFoot, true, Buzzer);
Otto.home();
}
void loop() {
Otto.swing(1, 1000, 25);
delay(1*1000);
Otto.updown(1, 1000, 25);
delay(1*1000);
Otto.tiptoeSwing(1, 1000, 25);
delay(1*1000);
Otto.jitter(1, 1000, 25);
delay(1*1000);
Otto.ascendingTurn(1, 1000, 25);
delay(1*1000);
}
|
沒有留言:
張貼留言