-
Notifications
You must be signed in to change notification settings - Fork 10
/
sample-dongleless.py
58 lines (43 loc) · 1.01 KB
/
sample-dongleless.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
import dongleless
def rest(myo):
print("rest")
def fist(myo):
print("fist")
def wave_in(myo):
print("wave_in")
def wave_out(myo):
print("wave_out")
def wave_left(myo):
print("wave_left")
def wave_right(myo):
print("wave_right")
def fingers_spread(myo):
print("fingers_spread")
def double_tap(myo):
print("double_tap")
def unknown(myo):
print("unknown")
def arm_synced(myo, x_dir, arm):
print("arm_synced")
def arm_unsynced(myo):
print("arm_unsynced")
def imu_data(myo, quat, accel, gyro):
print("imu_data")
def emg_data(myo, emg):
print("emg_data")
function_dict = {
"rest":rest,
"fist":fist,
"wave_in":wave_in,
"wave_out":wave_out,
"wave_left":wave_left,
"wave_right":wave_right,
"fingers_spread":fingers_spread,
"double_tap":double_tap,
"unknown":unknown,
"arm_synced":arm_synced,
"arm_unsynced":arm_unsynced,
# "imu_data":imu_data, #printing these gets really crowded, uncomment them if you want to use them.
# "emg_data":emg_data
}
dongleless.run(function_dict)