After watching the abilities and hacking wiimotes, I really want to use it in the final of "Intro to programming". Everyone should make a python program and present it to the class.
I want to make a game with pygame including wiimote. I found pywiiuse , which is a very simple wrapper for wiiuse using c types.
I can’t get anything but LEDs and vibrate to work. Buttons, IR, motion sensors, nothing. I tried different versions of wiiuse, pywiiuse, even python. I can’t even cite the examples that came with him to run. Here is the code I made as a simple test. I copied the sample code in C ++.
from pywiiuse import *
from time import sleep
wiimotes = wiiuse_init()
found = wiiuse_find(wiimotes,1,5)
wiimote = wiimotes.contents
wiiuse_set_leds(wiimote,WIIMOTE_LED_1)
wiiuse_rumble(wiimote,1)
sleep(1)
wiiuse_rumble(wiimote,0)
wiiuse_motion_sensing(wiimote,1)
while 1:
if(wiiuse_poll(wiimote,1)):
print 'EVENT'
And here is the conclusion when I run it.
wiiuse version 0.9
wiiuse api version 8
[INFO] Found wiimote [assigned wiimote id 1].
EVENT
EVENT
Traceback (most recent call last):
File "C:\Documents and Settings\Nick\Desktop\wiimotetext.py", line 26, in <mod
ule>
if(wiiuse_poll(wiimote,1)):
WindowsError: exception: access violation reading 0x00000004
, , , EVENT 2-5 , . , , .
!