griffin_powermate

A simple library to use the Griffin Powermate on Windows


Keywords
griffin, powermate, development
License
MIT
Install
pip install griffin_powermate==1.0.2

Documentation

Griffin Powermate Python library for Windows

This library to use the Griffin Powermate from Python in windows.

Griffin Powermate

Requirements

Install with pip

pip install griffin_powermate

Usage

def move_listener(direction, button):
  print "Moved: {0} - {1}".format(direction, button)

devices = GriffinPowermate.find_all()
if len(devices) > 0:
  print "Found Powermates"
  powermate = devices[0]
    
  try:
    powermate.open()
    powermate.on_event('move', move_listener)

    print("\nWaiting for data...\nPress any (system keyboard) key to stop...")
    while not kbhit() and powermate.is_plugged():
      # keep the device opened to receive events
      sleep(0.5)
  finally:
    powermate.close()

API

TBC

Documentation & useful links

Contributing

Contributions and suggestions are welcome :)

Licence

Released under the MIT License