Friday, December 3, 2010

The Python code:
#!/usr/bin/python

import cwiid

from time import sleep

print "Press 1+2 on the Wiimote now"
w = cwiid.Wiimote()
print "Connection established"

while (True):
for x in range(0,16):
sleep(1.0)
w.led = x
print "LED status is %02d" % w.state["led"]

No comments:

Post a Comment