User Tools

Site Tools


designs:setup:pi:initial

Setting up the Raspberry Pi

Card image

We recommend the version from AdaFruit that already has the appropriate configuration for the PiTFT screen, see https://learn.adafruit.com/adafruit-pitft-3-dot-5-touch-screen-for-raspberry-pi and follow the instructions.

First-time power-on screen

The first time you power on the Raspberry Pi after flashing with Raspbian, you will need to perform the first-time bootup configuration. Here's what I recommend.

  • Expand the filesystem to fill the card (option 1, just select it and press ENTER).
  • Change the password for user “pi” (by default the username is “pi” and the password is “raspberry”).
  • Enable the Pi camera.
First boot-up

The Raspberry Pi should be plugged into a live internet connection via its ethernet port. Then, log into the Raspberry Pi, either by plugging in a USB keyboard (and using the on-board PiTFT screen) or by using SSH (Secure Shell) from another computer on the network. Note that if the Raspberry Pi was plugged into the network (and assigned an IP address via DHCP), the message “My IP address is …” and then the obtained IP address should appear on the PiTFT screen, just above the login prompt.

The default username is “pi” and the default password is “raspberry”. We recommend running the following:

  • Update the installation.
    • sudo apt-get update
    • sudo apt-get upgrade
  • Install some useful utilities - in this case “screen” (which gives you a persistent console even if you disconnect) and “vim” (a very useful text editor). Note that “nano” is installed by default.
    • sudo apt-get install screen vim
Enabling the serial port

If you connect anything to the serial port on the GPIO pins (as you would if you were connecting an OpenCM 9.04 board, for instance) you'll need to reconfigure the Raspberry Pi as it usually runs a console on the serial port (ttyAMA0).

  • Edit /boot/cmdline.txt and remove the console option mentioning ttyAMA0 (just the option itself - the bit between spaces - NOT the whole line). For example, if the line says:
    dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:VGA8x8

    , change it to say

    dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:VGA8x8
  • Edit /etc/inittab and remove any lines mentioning ttyAMA0 (should just be a single line right at the end).
  • Reboot
    sudo reboot
designs/setup/pi/initial.txt · Last modified: 2015/05/05 23:44 by raymondsheh