forked from openFrameworks-RaspberryPi/openFrameworks
-
Notifications
You must be signed in to change notification settings - Fork 0
Raspberry Pi Getting Started
pizthewiz edited this page Jan 6, 2013
·
55 revisions
- Install the latest Raspbian image, according to the instructions in the Official Quickstart Guide.
- Make sure you are working with the the "hard float" version of wheezy (aka "Raspbian"), not the soft-float version (aka "Soft-float Debian “wheezy”).
- Please note if you are booting for the first time you will need to have a USB keyboard and either a HDMI Monitor or a HDMI to DVI/VGA adapter depending on your setup. Please read this guide as it contains a lot of useful information about bringing up your pi for the first time. Please select the following options from the configuration screen described in the previous guide.
- expand_rootfs, this expands the root file-system to your full SD card.
- ssh, enable sshd at boot (if you wish to ssh into your pi instead of using a USB keyboard)
- memory_split, you should configure the GPU/CPU memory split to be 50/50 between the GPU and CPU (128MB/128MB for 256MB models and 256MB/256MB for 512MB models). You can change this later by following step 4 of this guide.
- you will need to reboot your pi after this step
- Once you are logged in to the RPI on the command line (via SSH or plugged into a screen) make sure your system is up-to-date.
sudo apt-get cleansudo apt-get updatesudo apt-get upgrade- Note: The above steps may take a little while.
- If you are still having issues updating apt-get run the following command then repeat the steps from above:
sudo rm /var/lib/apt/lists/* -vf - install git:
sudo apt-get install git - install and enable Multicast DNS (mDNS) for board to be reachable at
raspberrypi.local.from machines on the same network:sudo apt-get install libnss-mdns
- Update the raspberry-pi firmware and configure the memory split between the CPU and GPU
- run
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update - then execute the
rpi-update - edit
/boot/config.txtand set gpu_mem option togpu_mem=128for the 256mb pi andgpu_mem=256for the 512mb pi - reboot your pi for these changes to take affect
- run
- Then clone this repo:
git clone https://github.com/openFrameworks-RaspberryPi/openFrameworks/- Note: If you want to contribute code to the this project, create your own branch and submit a pull request to the
develop-raspberrypibranch of this repo. - Note: For purposes of discussion below, $(OF_ROOT) is will be location of the openFrameworks root folder you created during this cloning process.
- Then move into your newly created directory ...
cd openFrameworks
- ... and checkout the
master-raspberrypibranch:git checkout master-raspberrypi- Note: The
master-raspberrypibranch is our best effort at a "it was working the last time we checked" branch.master-raspberrypiis almost always a little bit behind thedevelop-raspberrypibranch, whichusuallyworking, but is currently being developed at a rapid pace, so don't be surprised if you get odd errors. Either one you choose, if you find errors, please leave bug reports in our issue tracker. To use the develop branch,git checkout develop-raspberrypi.
- Next, you will need to install the dependencies using the following command:
sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev gstreamer0.10-nice gstreamer0.10-tools gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly gstreamer0.10-alsa libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev gstreamer0.10-ffmpeg libglew-dev libopenal-dev libsndfile-dev libfreeimage-dev libcairo2-dev libgtk2.0-dev libjack-jackd2-dev python-lxml python-argparse portaudio19-dev alsa-utils
- Next you need to build the core openFrameworks libraries. To do so, navigate to the
$(OF_ROOT)/libs/openFrameworksCompiled/projectfolder on your RPI and run:-
maketo build the Release library. - or
-
make Debugto build the debug library. - Note: This will use the new makefile system to automatically detect your system and will load the platform specific configurations found in the
linuxarmv6lsubfolder. This platform specific makefile is used for compiling BOTH core libraries AND compiling specific oF projects. If you are experimenting with missing features, you may need to modify that file at some point. It is very well documented (in fact all of the new makefile system is heavily commented, so feel free to look around and make suggestions!). - Note: This initial build of the release openFrameworks static libs may take 10-15+ minutes. If you have the need for speed and have an Ubuntu desktop machine to spare, see the Raspberry Pi Cross Compiling Guide.
-
- Assuming everything went well with the the last step, you can now navigate to the
$(OF_ROOT)/apps/devAppsfolder and try out a few simple RPI apps. To try the simplest one, go to theraspberrypi_hello_worldfolder and run:make- Note: This may take a few minutes to run the first time. Then navigate into bin and run the app as instructed.
- To run other examples or try out your own program, for the moment we recommend copying the
raspberrypi_hello_worldexample. In the future,projectGeneratorwill make this easier.- Note: If you are a developer, please take a look at the
config.makefile and theaddons.makefiles in the project directory.
- Note: If you are a developer, please take a look at the
- Notes:
- For doing development on your pi from OS X via SSH you should perform the following steps:
- From OSX select System Preferences>Sharing>Internet Sharing
- Check Internet with 'Share Your Connection from: WiFi' and 'To Computers Using: Ethernet'
- Plug an ethernet cable from your Raspberry Pi into your Mac
- OSX uses the range 192.168.2.2-254 as its DHCP range for devices connected via the ethernet jack your pi will probably be 192.168.2.2 but it could be 192.168.2.7
- You might have to run (nmap)[http://nmap.org/] to find the IP of your pi if you do not have a USB keyboard handy
-
nmap -v -sP 192.168.2.2-254should do the trick
- If you have enabled mDNS (see above) or are using an earlier version of Raspbian with mDNS pre-enabled, the board will be reachable at
raspberrypi.local.(orraspberry.local.) and you can SSH with the username pi:ssh pi@raspberrypi.local. - Now open terminal and run the SSH command
ssh pi@the.ip.address.of.your.pi - if everything went well you should be presented with a password prompt.
- For doing development on your pi from OS X via SSH you should perform the following steps: