-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
61 lines (57 loc) · 1.4 KB
/
test.py
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
56
57
58
59
# by Augustus Nightcustard
# heavily based upon work by Carl Monk (@ForToffee)
# based on work from http://playground.arduino.cc/Main/RoboSapienIR
# command codes originally from http://www.aibohack.com/robosap/ir_codes.htm
import robo
import time
rs=robo.Robo(21) #create Robo object for GPIO 21
rs.send_code(0xB1) #Issue reset command
time.sleep(10)
rs.send_code(0x81) #Right arm up
time.sleep(2)
rs.send_code(0x81)
time.sleep(2)
rs.send_code(0x82) #Right wrist out
time.sleep(2)
rs.send_code(0x85) #Right wrist in
time.sleep(2)
rs.send_code(0x82) #
time.sleep(2)
rs.send_code(0x85) #
time.sleep(2)
rs.send_code(0xA0) #RightTurnStep
time.sleep(2)
rs.send_code(0xA0) #RightTurnStep
time.sleep(2)
rs.send_code(0xC0) #RHStrike3
time.sleep(2)
rs.send_code(0xC2) #Burp
time.sleep(1)
rs.send_code(0xC3) #RHStrike3
time.sleep(2)
rs.send_code(0xC3)
time.sleep(2)
# raw_input('Enter')
rs.send_code(0x89) #Left arm up
time.sleep(2)
rs.send_code(0x89)
for i in range(0,2):
rs.send_code(0x8B) #Tilt left
time.sleep(1)
rs.send_code(0x83) #Tilt right
time.sleep(1)
rs.send_code(0x83)
time.sleep(1)
rs.send_code(0x8B)
rs.send_code(0x8C) #Left arm down
rs.send_code(0x84) #Right arm down
time.sleep(1)
rs.send_code(0x8C)
rs.send_code(0x84)
time.sleep(1)
# raw_input('Enter')
rs.send_code(0xC4) #Hi 5
time.sleep(1)
# raw_input('Enter')
rs.send_code(0xCE) #Roar
# rs.send_code(0xD1) # Rosebud