Follow the instructions available here to install openFrameworks on the Raspberry Pi.
If you don't have your favorite text editor yet, download Sublime Text - it is available for Mac, Linux and Windows
It looks and works the same way in all three platforms.
There is a Git repository here. Click on Download ZIP or clone it with Git if you have it installed by using the following commands in the Terminal:
cd /Users/your/workshop/directory git clone https://github.com/kr15h/rpi-of-workshop-examples.git cd rpi-of-workshop-examples
As said in the openFrameworks website:
openFrameworks is an open source C++ toolkit for creative coding.
True it is...
openFrameworks is written in C++ and basically it is C++ with all it's pros and cons.
There are two main directories:
There are two basic file types:
Just like Processing or Arduino it is all about
two functions for most of the time:
In Arduino there is a loop() function
instead of draw()
openFrameworks has three main functions:
Let's start with the blankApp example to get our hands dirty and understand how it works by doing insted of talking.
To test the project, we have to upload it to the Raspberry Pi. You need to have a SFTP file browser to do that.
If you don't have your favorite yet, download FileZilla.
Open SFTP software and make a new connection to the Raspberry Pi. My settings are:
Drop the blankApp project directory into the /Users/pi/openFrameworks/apps/myApps
folder on the Raspberry Pi.
Connect to the Raspberry Pi via SSH.
cd /Users/pi/openFrameworks/apps/myApps/blankApp
make
make run
There has to be a Makefile in the project folder to be able to compile the project. If it is not there, copy it from some of the default projects like emptyExample:
cp ../emptyExample/Makefile ./
You need to have a addons.make file in your project directory. Simply enter the folder name of the addon you want to use in the file, separate multiple addons with a newline:
ofxMidi ofxOsc
The process is basically the same for almost all projects:
Try out and examine code of the other examples from the workshop's Git repository.