wiimote_test.py
Go to the documentation of this file.
00001 #!/usr/bin/env
00002 from __future__ import print_function
00003 from bluetooth import *
00004 
00005 print("Looking for compatible devices")
00006 
00007 nearby_devices = discover_devices(lookup_names = 1,duration = 10,flush_cache=True)
00008 
00009 for addr,name in nearby_devices:
00010 
00011      if name == 'Nintendo RVL-CNT-01' or name == 'Nintendo RVL-WBC-01':
00012           print ('Compatible controller:\n %s - %s' % (addr, name))
00013      if name == 'Nintendo RVL-CNT-01-TR':
00014           print ("Incompatible controller:\n %s - %s" % (addr,name))
00015 


wiimote
Author(s): Andreas Paepcke, Melonee Wise, Mark Horn
autogenerated on Sun Jul 9 2017 02:34:58