I’ve often been asked about what bits are useful when setting up the Raspberry Pi, so I’ve put in a load of links here to places that might help. It’s a bit random, needs formatting and tidying up. At least I’ll be able to find the stuff easily. Some of the stuff has been directly culled from their respective websites. I’ve tried to reference these directly in places where I can remember.
|Setting up the screen resolution||From: http://elinux.org/RPiconfig
Your HDMI monitor may support only a limited set of formats. To find out which formats are supported, use the following method.
/opt/vc/bin/tvservice -m CEA
/opt/vc/bin/tvservice -m DMT
/opt/vc/bin/tvservice -d edid.dat /opt/vc/bin/edidparser edid.dat
|Control of serial devices (such as IPR’s GPIO interface)||Install python serial library
sudo apt-get install python-serial
Remove the debug terminal from the GPIO connector
sudo nano /boot/cmdline.txt
Originally it contains:
dwc_otg.lpm_enable=0 rpitestmode=1 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
Delete the two parameters involving the serial port (ttyAMA0) to get the following:
dwc_otg.lpm_enable=0 rpitestmode=1 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
Change some other settings
sudo nano /etc/inittab
Comment out the following line:
2:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Add the pi user to the serial group
sudo usermod -a -G dialout pi
Further details from: http://www.irrational.net/2012/04/19/using-the-raspberry-pis-serial-port/
|Control of standard servos (note that a buffer board is required)||Installing ServoBlaster
To start the servo driver:
sudo ./servod –pcm
To kill it:
sudo killall servod
To send to servo 1
echo 1=120 > /dev/servoblaster
To start the servo driver only using four output pins:
sudo ./servod –pcm –p1pins=”7,11,12,13,0,0,0,0″
sudo ./PiBits/ServoBlaster/user/servod –pcm –p1pins=”7,11,12,13,0,0,0,0″
or all of the output pins…
sudo ./servod –pcm –p1pins=”7,11,12,13,15,16,18,22″
Useful little bit for controlling the servos from an interactive command line:
start the servo driver as above then use:
The keys are left, right, up & down cursor. X is used to exit. Page Up and Page down are used to set the servo increment/decrement values. For some reason, sbload didn’t work, so use the servo driver commands given.
|Installing the GPIO / Scratch stuff||See: Cymplecy for the driver that allows Scratch to control the GPIO
Do the following:
sudo wget http://goo.gl/Pthh62 -O isgh5.sh
sudo bash isgh5.sh
|Fixed IP address||Sorting out a static IP address so that it can always be found in the same place:
|Using a proxy||This could be useful: Logging in an individual student to use a school proxy:
Basic access through a proxy:
|PiFace||Latest version has the PiFace control stuff built in
Examples found at:
documentation stored at (use midori to open on the Pi):
|Figlet||There are a variety of different fonts available.
_ _ _
| |__ ___| | | ___
| ‘_ \ / _ \ | |/ _ \
| | | | __/ | | (_) |
|Toilet||Customisable display similar to Figlet. Really requires SSH to be set up correctly to use UTF-8
# “”# “”#
# mm mmm # # mmm
#” # #” # # # #” “#
# # #”””” # # # #
# # “#mm” “mm “mm “#m#”
|Espeak||Text to speech system. Generates a load of (non-fatal) errors.|
|Fortunes||Generates a random fortune cookie. Use man fortunes to show the instructions.|
|Motion||Reads a connected webcam and can detect movement. Runs a script if set up to do so. Also useful with a webserver as it creates a web-cam.
down this page: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=18314
sudo motion -n starts the daemon off… but not running as a daemon
config files stored at /etc/default/motion and /etc/motion/motion.conf
|vncserver||Allows communication between the Pi and a VNC program – copying the screen so that it’s available on another machine.
Can be worth creating a file which has the following (and remember to set permissions):
|Codecs||Install the codecs from the RaspberryPi.org web page for showing MPEG formatted videos.|
|Seq-24||MIDI sequencer that allows music based on repeating patterns|
|Sonata||Works with MPD (music player daemon) allowing a good level of control.|
|Stella||Allows the Raspberry Pi to be used as an Atari emulator. Needs the roms to be downloaded first|
|Childsplay||Collection of games suitable for primary school ages|
|GCompris||Collection of games suitable for primary school ages|
|Potato Guy (ktuberling)||perhaps known as Ktuberling. Allows the production of interesting pictures by stamping shapes down. Has other modes: Pizza, Railway, Robot etc.|
|LibreOffice||Full Office-type suite|
|Tuxpaint||Excellent paint-type package with a wide variety of features.|
|VLC media player|
|whitey youtube viewer|
|kstars||shows a star map|
|Wireless access (and Google translate elsewhere on the page)||http://www.daveconroy.com/using-your-raspberry-pi-as-a-wireless-router-and-web-server/
|CUPS||Common Unix Printing System – allows the Raspberry Pi to use a networked printer.|
|luvcview, guvcview||webcam viewers|
|boxes||sudo apt-get install boxes (see the ideas page for how to use)|
Sudo apt-get install apache2
You may need to change the location of where your web pages are stored.
Config file at:./…
How about controlling GPIO from the web page?
To restart apache after config changes:
sudo service apache2 restart
|GPS related||GPSPrune – view and map GPS data|
|Fixed local domain name||http://zackeryfretty.com/assigning-a-local-domain-to-your-raspberry-pi-aka-stop-forgetting-your-ip-address/|
|Wireless access point – connect without router?||http://sirlagz.net/2012/08/09/how-to-use-the-raspberry-pi-as-a-wireless-access-pointrouter-part-1/|
|Maelstrom||An arcade-style game resembling Asteroids.|
|jp2a||JPEG to ASCII converter – takes an image and converts it into a grid of letters and symbols. Looks rather interesting when printed…
Show a JPEG image in coloured text, along with a switch to ensure it outputs 150 letters wide.
jp2a –color –width=150 sofa.jpg
Using jp2a with CUPS to produce a printout – also uses –background to ensure that it works correctly on white paper.
jp2a –background=light –width=80 sofa.jpg | lp -o landscape
|mpd, mpc, ncmpc, ncmpcpp, sonata||Mpd – music player daemon – allows connection to streaming radio and also attached devices.
Needs a config file to be edited and then a database to be built.
Can control using Mpc from the command line or ncmpc (Good) or ncmpcpp (Better but must get my head around how to select more than one file and add it into the playlist).
ncmpcpp allows a clock to be displayed while music is playing – might be handy if a small composite display is used.
Also can use Sonata within X.
|Cowsay|| Sets up an onscreen ASCII picture of a cow that will speak your text.
It’s worth removing two files from /usr/share/cowsay/cows if you’re using it with children. Use ls first to check!