Repository to adapt this library into Openframeworks.
The goal is to use the Adafruit Leds Matrix & bonnet with Openframeworks on raspberry-Pi 3 model B+.
item | link |
---|---|
Raspberry pi 3 model B+ | https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/ |
Matrix Bonnet | https://www.adafruit.com/product/3211 |
Matrix of Leds | https://www.adafruit.com/product/3649 |
SDCard | amazon link |
Power Supply | https://www.adafruit.com/product/1466 |
Get the latest OpenFrameworks version from here(linux armV6), and follow this tutorial to get set up with the openframeworks on raspberry Pi.
Make sure you can run some of the examples before proceeding any further (for example : OF_Install_Directory/examples/3DPrimitivesExample/).
Get the latest version of the rpi-rgb-led-matrix from here.
Follow the tutorial on the readme page from the Let's do it section.
Make sure you can run a demo from the example-api-use section.
Just
cd example-api-use
make
sudo ./demo
Make a note of the path to the root directory of the rpi-rgb-led-matrix :
#from the root directory of the rpi-rgb-led-matrix repo :
pwd
#gives me : /home/pi/rpi-rgb-led-matrix-master
#copy into the clipboard:
# install xclip : sudo apt-get install xclip
pwd | xclip -i
Add this repository to your Openframeworks addon folder in :
cd OF_Install_Directory/addons/
git clone https://github.com/pierrextardif/ofxLedMatrix
Then change the path of the addons.make using the path copied earlier:
cd ofxLEDMatrix/
sudo nano addon_config.mk
Replace
RGB_LIB_PATH with the path copied.
Just try running the example.
Try copying the example on an other (more powerful) machine and running it, transforming the line :
//#define COMPUTERWORK
into
#define COMPUTERWORK
so the graphics can be worked on, on a faster machine ( compilation), then uploaded on the PI.
The example given by adafruit includes an accelerometer.
In order to use it I have included the code they have used in their example and mapped it to the movements of the ofEasyCam for zooming in/out.
You can wire the acelerometer using this diagram :
- pierre Tardif codingcoolsh.it 💾
This project is licensed under the MIT License - see the LICENSE.md file for details.
Adding the libray precompiled straight into the `/lib` folder of the repo (no external install).