Skip to content
/ pm8 Public

Directly accessing the Griffin Power Mate from C++ (OS X, Linux)

License

Notifications You must be signed in to change notification settings

kybernetyk/pm8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pm8

Little toy program to directly access the Griffin Power Mate via USB. Their
provided OS X app is fine but doesn't do what I want it to do (mad light
effects with Philips Hue).

Works on OS X and Linux (tested on Ubuntu and Raspbian)

NOTE: There's also a Swift 3 version of this code:
https://github.com/kybernetyk/SwiftHIDAPI

Dependencies:
	- clang (or gcc) in some newer incarnation (requires C++11 support)
	- hidapi ( https://github.com/signal11/hidapi )


Build:
	First download, build and install hidapi from https://github.com/signal11/hidapi
  You don't really need to build it yourself nowadays as both Homebrew and
  Ubuntu/Debian repository versions seem to work just fine nowadays.

  Then run the appropriate build script for your OS/compiler combination:

  OS X:
    run ./build_osx.sh
  Linux (clang, raspberry pi):
    run ./build_linux.sh 
    yes, this code should work & compile on the rpi, too. 
  Linux (gcc because gcc requires special treatment):
    run ./build_linux_gcc.sh
 
Run:
	On success the compile script puts the binary into ./build/

  On OS X make sure to quit the official Griffin Power Mate app first as
  HIDAPI access seems to be blocked by it.

  On Linux you need to run this code with super user privileges. (sudo)
  I would suggest you add a udev rule though because you're running my shitty
  code as root ;)
  How to add udev rules can be found in the HIDAPI docs. They got a pretty
  nice example so even I was able to get it done.

Copyright & License:
	This code is licensed under the Affero GPL3 License!
	(c) Jarosław Leon Szpilewski


About

Directly accessing the Griffin Power Mate from C++ (OS X, Linux)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published