Raspberry Pi 第一次設定

Remote Login into Raspberry Pi by SSH

host$ ssh pi@raspberry

Localise Setting

$ sudo raspi-config
    config_keyboard: “PC-104” “US”
    change_locale: “en_US.UTF-8 UTF-8”
    change_timezone: Asia/Taipei

Update Software

$ sudo apt-get update
$ sudo apt-get --auto-remove --purge dist-upgrade
$ sudo apt-get clean

Update Firmware and reboot

$ sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update
$ sudo chmod +x /usr/bin/rpi-update
$ sudo apt-get install git-core
$ sudo rpi-update
$ sudo shutdown -r now

Enable I2C/SPI

$ sudo vi /etc/modprobe.d/raspi-blacklist.conf
# blacklist spi and i2c by default (many users don't need them)
#blacklist spi-bcm2708
#blacklist i2c-bcm2708

$ sudo vi /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

snd-bcm2835
i2c-dev

$ sudo adduser pi i2c

Install I2C Tools

$ sudo apt-get install i2c-tools
$ sudo apt-get install python-smbus

Install C library for Broadcom BCM 2835

$ wget http://www.open.com.au/mikem/bcm2835/bcm2835-1.5.tar.gz
$ tar xvfz bcm2835-1.5.tar.gz
$ cd bcm2835-1.5
$ ./configure
$ make
$ sudo make install