Skip to content

namacha/wiimote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Wiimote

A simple python library to interface with Nintendo Wiimote

Requirements

How to Use

import wiimote
from wiimote.buttons import *


w = wiimote.Wiimote()
# w = wiimote.Wiimote(ADDR='XX:XX:XX:XX:XX:XX')  # you can specify wiimote address


@w.onpressed(BUTTON_A | BUTTON_B)
def a_and_b():
    print 'A and B pressed!'


@w.onreleased(BUTTON_DOWN)
def down():
    print 'down released'


if __name__ == '__main__':
    import sys
    import time

    try:
        w.connect()
    except wiimote.WiimoteNotFound:
        sys.stderr.write('Wiimote not found\n')
        sys.stderr.flush()
        sys.exit(1) 

    while w.connected:
        time.sleep(1)

About

A simple wiimote library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages