Steps

If you are using your own Raspberry Pi and already have your OS installed, skip to step 5.

  1. Set up the SD Card (Instructions)
    1. Download NOOBS
    2. Extract NOOBS
    3. Copy all files in the .zip to the SD Card directory
  2. Prepare the Pi for boot
    1. Insert the SD card in the Pi
    2. Connect HDMI to display
    3. Connect a USB keyboard (mouse optional)
    4. Connect ethernet cable
    5. Connect USB-micro power (wall or computer is fine)
  3. Install OS
    1. Select Raspbian from the list using arrow keys (or mouse) then select "Install".
    2. Wait a while for the install to complete. The Pi will reboot when it's done.
    3. When the Pi powers up the first time, raspi-config will start.
      1. Select "Advanced Options"
      2. Select "SSH" to set up SSH access to the Pi.
      3. Select "Finish" when done.
  4. Install ddd

    sudo apt-get install ddd
    
  5. Install geany

    sudo apt-get install geany
    
  6. Install wiringPi (Instructions)

    1. Install git

      sudo apt-get install git-core
      
    2. (Optional) Make sure you have the latest Raspian updates

      sudo apt-get update
      sudo apt-get upgrade
      
    3. Get wiringPi using git

      git clone git://git.drogon.net/wiringPi
      
    4. Move into the wiringPi directory

      cd wiringPi
      
    5. (Optional) Update wiringPi

      git pull origin
      
    6. Build wiringPi

      ./build
      
  7. Modify the XAUTHORITY environment variable to allow sudo for visual applications.

    1. export XAUTHORITY=/home/pi/.Xauthority if your shell is bash or export $XAUTHORITY="/home/pi/.Xauthority" if your shell is zsh.
    2. Make the change permanent by modifying the /etc/sudoers file. sudo visudo then insert a line so the file has the following at the top (after the comments)

      #
      Defaults    env_reset
      Defaults    env_keep+=”HOME XAUTHORITY”
      Defaults    mail_badpass
      
  8. You're good to go!

Other stuff

SPI device (Lab 7)

If you get the message Unable to open SPI device: No such file or directory then your SPI device is probably blacklisted. To test this, run cat /etc/modprobe.d/raspi-blacklist.conf and look at what you see. If you see the following you have a problem. (source)

# blacklist spi and i2c by default (many users don't need them)

blacklist spi-bcm2708
blacklist i2c-bcm2708

What you want to see is the following

# blacklist spi and i2c by default (many users don't need them)

#blacklist spi-bcm2708
blacklist i2c-bcm2708

You can edit the file using sudo nano /etc/modprobe.d/raspi-blacklist.conf.

Back up and Restore SD card

Mac

diskutil list
diskutil unmountDisk /dev/diskN
dd if=/dev/diskN of=/path/to/image 
dd if=/path/to/image of=/dev/diskN

Linux

fdisk -l
unmount /dev/sba*
dd if=/dev/diskN of=/path/to/image 
dd if=/path/to/image of=/dev/diskN

Raspberry Pi network addresses

Only needed for using in the e85 lab:

  1. sudo nano /etc/network/interfaces
  2. Replace iface eth0 inet dhcp with the following where xxx is replaced by the table of IPs.

    iface eth0 inet static
    address 134.173.52.xxx
    netmask 255.255.255.0
    broadcast 134.173.52.255
    gateway 134.173.52.200
    
  3. Use ctrl-x to quit, press y to confirm saving, then enter to save the file.

  4. sudo reboot to restart with the updated network configuration

  5. You should be able to login with ssh or putty for the rest of the setup.

rPi IP Address
01 134.173.52.32
02 134.173.52.33
03 134.173.52.34
04 134.173.52.35
05 134.173.52.36
06 134.173.52.37
07 134.173.52.38
06 134.173.52.39
09 134.173.52.40
10 134.173.52.41

Other References