Skip to content

crash7/griffin-powermate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

from griffin_powermate import GriffinPowermate

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

About

Griffin Powermate Python library for Windows

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages