View Single Post
  #2  
Old 03-11-2015, 07:46 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
Does the following show the nunchuk is connected?

Code:
import viz
viz.go()

#Add wiimote extension 
wii = viz.add('wiimote.dle') 

#Connect to first available wiimote 
wiimote = wii.addWiimote() 

#Rumble wiimote for 0.5 seconds when nunchuk is connected 
def onConnect(e): 
	if e.extension == wii.EXT_NUNCHUK:
		print 'nunchuk connected'
		e.object.setRumble(True,0.5) 
viz.callback(wii.EXT_CONNECT_EVENT,onConnect)
You can get the acceleration. The wiimote plug-in page documents all the available commands.
Reply With Quote