On Github kr15h / rpi-of-introduction
Everything should be all-right if you are using a regular HDMI display - Raspberry Pi should be able to detect monitors's native resolution autmatically.
In case you are using a HDMI to DVI adapter, you might need to adjust the monitor settings manually by editing the config.txt file on the Raspbian boot partition.
Here you can find available configuration options: http://elinux.org/RPiconfig#Video
For the sake of simplicity, we are going to use the Raspberry Pi desktop mode. To enter it, type the following in the Raspberry Pi terminal:
startx
Press Enter and Raspberry Pi should transform in an almost normal desktop computer.
In the Raspberry Pi Terminal type:
sudo apt-get install gedit
Press Enter to start the installation process. It might happen that the apt-get program asks you questions, press Y and Enter to proceed.
To test if it works, type the name of the program (gedit) in the RPi Terminal:
gedit
Press Enter and a window with a text editor interface should open.
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.
Don't be afraid! There are good C++ learning resources:
If you followed the guide on the oF website, your openFrameworks directory should be located in your home directory: /home/pi. Enter it by typing in the RPi Terminal:
cd /home/pi/openFrameworks
The apps directory contains categories of apps. There is one predefined category myApps already there.
There are two main directories that should be in each openFrameworks project folder:
There are two basic file types:
In the Pi Terminal type
cd /home/pi/openFrameworks/apps
and press Enter to go to your openFrameworks application directory.
In the Pi Terminal type
git clone https://github.com/kr15h/rpi-of-workshop-examples.git
press Enter. This will download the example projects of this workshop in rpi-of-workshop-examples within the openFrameworks apps directory.
In the Pi Terminal type
cd rpi-of-workshop-examples
and press Enter.
Try to compile and run the examples by entering a project directory. Type
cd testApp
and press Enter to enter the testApp project directory. Type
make
and press Enter to compile. It will take some time, just wait.
In Pi Terminal type
make run
and press Enter to open the testApp program. You can also type
./bin/testApp
to launch it as the compiled program file is located in the bin/ directory within the testApp project folder.
Try to compile and run other examples by repeating the previous steps.
Some of the examples require 3rd party addons. Navigate to the addons folder by typing
cd /home/pi/openFrameworks/addons
and pressing Enter.
To install the ofxTween addon, type
git clone https://github.com/arturoc/ofxTween.git
press Enter and wait. ofxTween directory will be created in the openFrameworks addons folder.
To install the ofxStateMachine addon, type
git clone https://github.com/neilmendoza/ofxStateMachine.git
press Enter and wait. ofxStateMachine directory will be created in the openFrameworks addons folder.
Similarly you can install other addons if they are published on GitHub. If they are not, download the addon and place it in the openFrameworks/addons folder yourself.
ofxaddons.com contains a lot of interesting addons that can be useful for your own projects. Note that all of them does not work on the Raspberry Pi, so be careful.
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
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 ./