Setting up the Raspberry Pi – a collection of links

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.

  • Set the output format to VGA 60 Hz (hdmi_group=1 hdmi_mode=1) and boot up the Raspberry Pi
  • Enter the following command to give a list of CEA supported modes
/opt/vc/bin/tvservice -m CEA
  • Enter the following command to give a list of DMT supported modes
/opt/vc/bin/tvservice -m DMT
  • Enter the following command to show your current state
/opt/vc/bin/tvservice -s
  • Enter the following commands to dump more detailed information from your monitor
/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

cd PiBits/ServoBlaster/user
make servod
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″
or use:

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:
sbcontrol
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

http://cymplecy.wordpress.com/scratchgpio/scratch-raspberrypi-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:

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=91&t=49350

or:

https://www.modmypi.com/blog/tutorial-how-to-give-your-raspberry-pi-a-static-ip-address

Using a proxy This could be useful: Logging in an individual student to use a school proxy:

http://www.edugeek.net/forums/cleo/112806-raspberry-pi-connecting-proxy-server.html

Basic access through a proxy:

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=49383

PiFace Latest version has the PiFace control stuff built in

Examples found at:

/usr/share/doc/python3-pifacedigitalio/examples

documentation stored at (use midori to open on the Pi):

/usr/share/doc/python3-pifacecommon/documentation/index.html

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

http://pingbin.com/2012/12/raspberry-pi-web-cam-server-motion/

http://www.raspberrypi.org/phpBB3/viewtopic.php?t=20561

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=49565

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=38&t=17308

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):

#!/bin/sh
vncserver :1 -geometry 800×600 -depth 16

Also consider:

http://pihw.wordpress.com/guides/guide-to-remote-connections/

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
omxplayer
whitey youtube viewer
xclock
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/

and also

http://www.cyberciti.biz/faq/debian-ubuntu-linux-setting-wireless-access-point/

CUPS Common Unix Printing System – allows the Raspberry Pi to use a networked printer.

http://www.howtogeek.com/169679/how-to-add-a-printer-to-your-raspberry-pi-or-other-linux-computer/

luvcview, guvcview webcam viewers
boxes  sudo apt-get install boxes (see the ideas page for how to use)
Apache2 Webserver

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?

http://raspberrywebserver.com/gpio/piface/building-a-remote-control-vehicle-using-a-raspberry-pi.html

To restart apache after config changes:

sudo service apache2 restart
GPS related GPSPrune – view and map GPS data

http://blog.retep.org/2012/06/18/getting-gps-to-work-on-a-raspberry-pi/

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/

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=36&t=19120

http://www.pi-point.co.uk/documentation/

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!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s