Programming The Raspberry Pi
Programming The Raspberry Pi
contents
introduction unboxing and setup flashing an SD card logging in for the first time the JOE text editor running the hello world program a (slightly) more complex example an OpenGL ES graphics program in C the configuration file wrap up
introduction
Raspberry Pi is a small, cheap ARM-based PC for education and hobbyists Runs Debian GNU/Linux from an SD card
Standard image available from http://www.element14.com Includes a broad range of tools and examples
Feature CPU GPU Memory Video Audio USB Storage Networking Power
Specification 700MHz ARM1176-JZFS Broadcom VideoCore IV 256MB LPDDR2-800 HDMI, composite HDMI, stereo analog 2 x USB2.0 (model B) SD card 10/100 Ethernet 5V micro USB
unboxing
a quick tour
a quick tour
Power
a quick tour
Power
HDMI
a quick tour
Power
HDMI Ethernet
a quick tour
Power
HDMI Ethernet
USB
a quick tour
Audio Power
HDMI Ethernet
USB
a quick tour
HDMI Ethernet
USB
a quick tour
GPIO
Video Audio
Power
HDMI Ethernet
USB
a quick tour
GPIO SD Power
Video Audio
HDMI Ethernet
USB
flashing an SD card
You may have purchased a preinstalled card Otherwise, you will need to
Download an image and a copy of the tool dd-removable from www.element14.com/raspberrypi Flash the image onto a 2GB SD card from a Windows PC
flashing an SD card
flashing an SD card
You may have purchased a preinstalled card Otherwise, you will need to
Download an image and a copy of the tool dd-removable from www.element14.com/raspberrypi Flash the image onto a 2GB SD card from a Windows PC
enter the username pi, and password raspberry You may want to set the clock!
enter the username pi, and password raspberry You may want to set the clock!
At the command line, type joe helloworld.py When the editor appears, type print hello world Now type Ctrl+K and then X to save and exit More documentation available at http://joe-editor.sourceforce.net
At the command line, type joe helloworld.py When the editor appears, type print hello world Now type Ctrl+K and then X to save and exit More documentation available at http://joe-editor.sourceforce.net
A series of examples, building up to a simple game of Snake, can be downloaded and unpacked by typing wget http://www.raspberrypi.org/game.tar.gz tar xvfz game.tar.gz
A series of examples, building up to a simple game of Snake, can be downloaded and unpacked by typing wget http://www.raspberrypi.org/game.tar.gz tar xvfz game.tar.gz
wrap up
Weve seen how to
Set up, boot and configure your Raspberry Pi Create and edit text files using the JOE editor Run a simple Python script Download and unpack more examples Build and run one of the bundled C programs