-
Notifications
You must be signed in to change notification settings - Fork 0
Directly accessing the Griffin Power Mate from C++ (OS X, Linux)
License
kybernetyk/pm8
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
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 0
No packages published