The Raspbian Install process is fairly well documented using the Raspbian Installer. This is just to document common tasks after the stock install.

Install base utils

apt-get install sudo vim ntpdate git-core binutils make gcc ca-certificates rpi-update

Allow non-root user account access to ‘sudo’

adduser USERNAME sudo
For those Ubuntu users there is no ‘admin’ group in Raspbian (Debian Wheezy).

NTP time update

sudo rm /etc/localtime
sudo ln -s /usr/share/zoneinfo/Australia/Adelaide /etc/localtime
sudo ntpdate -u au.pool.ntp.org

Probably best to choose an NTP Server closest to your location or provided by your ISP

Firmware upgrade

EDIT (2014-03-31): rpi-update is now part of the Raspbian repositories and can be installed via apt-get install rpi-update (I have added this to the above line).

Note: unless you want the latest firmware this is not a necessary step as apt-get will update the firmware to the latest stable release.

Using Hexxeh updater.

Install dependencies

wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update
sudo rpi-update

Install WiringPi

Thanks to the excellent work of Gordon Henderson (https://projects.drogon.net/raspberry-pi/wiringpi/) this is a C-based program to read/write to the Raspberry Pi GPIO pins.

cd /usr/share
git clone git://git.drogon.net/wiringPi
cd wiringPi
git pull origin
./build

Output:

wiringPi Build script
=====================

The wiringPi I2C helper libraries will not be built.

WiringPi library
[UnInstall]
[Compile] wiringPi.c
[Compile] wiringPiFace.c
[Compile] wiringSerial.c
[Compile] wiringShift.c
[Compile] gertboard.c
[Compile] piNes.c
[Compile] lcd.c
[Compile] piHiPri.c
[Compile] piThread.c
[Compile] wiringPiSPI.c
[Compile] softPwm.c
[Compile] softServo.c
[Compile] softTone.c
[Link (Dynamic)]
[Install]

GPIO Utility
[Compile] gpio.c
[Link]
[Install]

All Done.

Testing the install

gpio readall

Output:

+----------+------+--------+------+-------+
| wiringPi | GPIO | Name   | Mode | Value |
+----------+------+--------+------+-------+
|      0   |  17  | GPIO 0 | IN   | Low   |
|      1   |  18  | GPIO 1 | IN   | Low   |
|      2   |  21  | GPIO 2 | IN   | Low   |
|      3   |  22  | GPIO 3 | IN   | Low   |
|      4   |  23  | GPIO 4 | IN   | Low   |
|      5   |  24  | GPIO 5 | IN   | Low   |
|      6   |  25  | GPIO 6 | IN   | Low   |
|      7   |   4  | GPIO 7 | IN   | Low   |
|      8   |   0  | SDA    | ALT0 | High  |
|      9   |   1  | SCL    | ALT0 | High  |
|     10   |   8  | CE0    | ALT0 | High  |
|     11   |   7  | CE1    | ALT0 | High  |
|     12   |  10  | MOSI   | ALT0 | Low   |
|     13   |   9  | MISO   | ALT0 | Low   |
|     14   |  11  | SCLK   | ALT0 | Low   |
|     15   |  14  | TxD    | ALT0 | High  |
|     16   |  15  | RxD    | ALT0 | High  |
+----------+------+--------+------+-------+

Leo Gaggl

ict business owner specialising in mobile learning systems. interests: sustainability, internet of things, ict for development, open innovation, agriculture

This Post Has 2 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.