Main Page
Namespaces
Classes
Files
File List
File Members
scripts
wiimote_test.py
Go to the documentation of this file.
1
#!/usr/bin/env
2
from
__future__
import
print_function
3
from
bluetooth
import
*
4
5
print(
"Looking for compatible devices"
)
6
7
nearby_devices = discover_devices(lookup_names = 1,duration = 10,flush_cache=
True
)
8
9
for
addr,name
in
nearby_devices:
10
11
if
name ==
'Nintendo RVL-CNT-01'
or
name ==
'Nintendo RVL-WBC-01'
:
12
print
(
'Compatible controller:\n %s - %s'
% (addr, name))
13
if
name ==
'Nintendo RVL-CNT-01-TR'
:
14
print
(
"Incompatible controller:\n %s - %s"
% (addr,name))
15
wiimote
Author(s): Andreas Paepcke, Melonee Wise, Mark Horn
autogenerated on Fri Jun 7 2019 22:01:33