← Back

ofxAdafruitPWMBonnet

github.com/WatershedArts/ofxAdafruitPWMBonnet · @WatershedArts
OF 0.10 Hardware Interface Raspberry Pi

A openFrameworks addon that allows you to control PWM devices through Adafruit's PWM Bonnet for Raspberry pi

1 0 Last commit 8y ago Created 8y ago

README

ofxAdafruitPWMBonnet



Overview



A openFrameworks addon for controling Adafruit's PWM Bonnet.

Adafruit PWM Bonnet

ofxAdafruitPWMBonnet is an addon for openFrameworks (v0.10.0+) that allows users to control multiple PWM components through Adadfruit's PWM Bonnet for Raspberry Pi.

If you would like to contribute to the addon feel free to fork, hack and mod the code. Also drop me a line and let me know how you end up using the addon.

@david_haylock

Setup



Open Terminal on the Pi.

sudo apt-get install python-smbus
sudo apt-get install i2c-tools

$ sudo raspi-config
$ 5 Interfacing Options
$ Enable I2C
$ Finish
$ Reboot


Connect the Bonnet to the Pi and Test if it appears sudo i2cdetect -y 1

Examples



I've included both ofxImGui and ofxGui in the examples I prefer using ofxImGui as its a bit quicker on the pi, but choose which ever gui you are more comfortable with.

Dev

Multiple Bonnets



You can stack multiple bonnets on top of each other, I would recommend following Adafruit's Guide on how to stack and address the bonnets.

Then check out the multiple bonnet example.

Dependencies



You will need ofxGPIO to use the bonnet.

For the examples you will need

https://github.com/jvcleave/ofxImGui
https://github.com/arturoc/ofxEasing
ofxGui


Thanks



Get this addon

HTTPS
SSH