Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 25 lines (23 sloc) 0.58 kB
5d7cf35 @wolfmankurd House keeping.
authored
1 #!/usr/bin/env python
2 import os, eZ430
353ac1e Added eZ430 class and ppt.py edited README
Ali Raheem authored
3
dbf4b70 @wolfmankurd Adding verbosity switch.
authored
4 verbose = 1
e932c23 @wolfmankurd Changed class form sensors to watch.
authored
5 watch = eZ430.watch()
5d7cf35 @wolfmankurd House keeping.
authored
6 if verbose: print "Opening eZ430 on",watch.dev
353ac1e Added eZ430 class and ppt.py edited README
Ali Raheem authored
7 if(os.system("xdotool --version")!=0):
8 print "You need xdotool."
9 os.exit(1)
10 while 1:
11 data = watch.read(7)
12 button = int(ord(data[6]))
13 if(button == 18):
dbf4b70 @wolfmankurd Adding verbosity switch.
authored
14 if(verbose): print "Right pressed."
353ac1e Added eZ430 class and ppt.py edited README
Ali Raheem authored
15 os.system("xdotool click 3")
16 watch.debounce()
17 elif(button == 50):
dbf4b70 @wolfmankurd Adding verbosity switch.
authored
18 if verbose: print "Left pressed."
353ac1e Added eZ430 class and ppt.py edited README
Ali Raheem authored
19 os.system("xdotool click 1")
20 watch.debounce()
21 elif(button == 34):
dbf4b70 @wolfmankurd Adding verbosity switch.
authored
22 if verbose: print "Home pressed."
353ac1e Added eZ430 class and ppt.py edited README
Ali Raheem authored
23 os.system("xdotool key Home")
24 watch.debounce()
Something went wrong with that request. Please try again.