Skip to content
x1sc0 edited this page May 19, 2015 · 12 revisions

External Links

  1. Raspberry Pi Homepage
  2. Raspberry Pi Official Documentaion
  3. Raspberry Pi Forums
  4. Raspberry Pi StackExchange
  5. Raspberry Pi 2 Model B
  6. Raspberry Pi Code
  7. Raspberry Pi Unofficial Wiki
  8. Raspberry Pi Pinout
  9. Acrobotic Hackathon Kit

From 0 to Running with Raspberry Pi 2

  1. Assemble PiTray enclosure by following the assembly instructions.
  2. Insert NOOBS (New Out Of the Box Software) microSD card.
  3. Connect monitor using HDMI to DVI.
  4. Connect mini wireless keyboard and touchpad RF USB transceiver.
  5. Connect wireless USB adapter.
  6. Connect the 5V/2A micro-USB wall adapter to micro-USB host port. quick start guide connections
  7. Change default GB/UK language and keyboard layout to US. NOOBS with language and keyboard selection highlighted
  8. Click Install.
  9. After installation is complete installer will reboot.
  10. On first boot, the Raspberry Pi Configuration Tool (raspi-config) will start. raspi-config menu
  11. Select "Enable Boot the Desktop/Scratch" and select "Desktop Log in as user 'pi' at the graphical desktop".
  12. Select Finish.
  13. Select Yes to allow reboot.
  • The default login for Raspbian is username pi with the password raspberry.
  • If you did not enable the graphical user interface to start automatically, type startx. Use sudo raspi-config from a terminal to configure the automatic startup of the graphical interface.

Configuration

Remote Access Console

SSH is enabled by default. See http://www.raspberrypi.org/documentation/remote-access/ssh/ for information on SSH clients.

Remote Access GUI

  1. sudo apt-get update

  2. sudo apt-get install x11vnc

  3. mkdir -p /home/pi/.config/autostart

  4. leafpad /home/pi/.config/autostart/vnc.desktop

  5. Enter the following

    [Desktop Entry]
    Type=Application
    Name=VNC
    Exec=x11vnc -display :0 -forever
    StartupNotify=false
    

Setup WiFi on Corporate WPA2 Network using TLS Client Certificate

  1. Log in to a Windows workstation using your personal Windows domain credentials,
  2. Click the Start button, Run, then type mmc.
  3. Click File > "Add/Remove Snap in...".
  4. Click Certificates.
  5. Click Add.
  6. Select "My User Account".
  7. Click Finish.
  8. Expand "Certificates - Current User" > Personal > Certificate.
  9. Right-click the personal certificate
  10. Left-click All Tasks > Export... (Intended Purpose = Client Authentication)
  11. Select "Yes, export the Private Key".
  12. Click Next.
  13. Select Choose "Include all certificates in the certification path if possible" and "Export all extended properties".
  14. Enter a password and confirm the password.
  15. Click Browse to save the file to your desktop or the location you prefer.
  16. Enter the file name mycert.pfx.
  17. Click Finish.
  18. Transfer certificate file mycert.pfx to the Raspberry Pi /home/pi directory.
  • If you have a wired Ethernet connection established and an SSH client on the host computer: scp mycert.pfx pi@respberrypi.local:/home/pi/
  1. Open a terminal.

  2. cd /home/pi

  3. openssl pkcs12 -in mycert.pfx -clcerts -out user.pem

  4. Enter password used when exporting PFX certificate.

  5. Enter same (or new) password for the PEM certificate.

  6. openssl pkcs12 -in mycert.pfx -cacerts -nokeys -out myca.crt

  7. Enter password used when exporting PFX certificate.

  8. sudo mv myca.crt /usr/local/share/ca-certificates/

  9. sudo leafpad /etc/wpa_supplicant/wpa_supplicant.conf

  10. Edit contents to contain the following. Where ssid is the name of your wireless network and identity if your fully qualified domain username (e.g. username@domain.example.com). If this file already exists, skip the first two lines below.

    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    
    network={
            ssid="myssid"
            key_mgmt=WPA-EAP
            pairwise=TKIP
            eap=TLS
            identity="username@domain.example.com"
            client_cert="/home/pi/user.pem"
            private_key="/home/pi/user.pem"
            private_key_passwd="my key password"
            ca_cert="/usr/local/share/ca-certificates/myca.crt"
    }
    
  11. sudo leafpad /etc/network/interfaces

  12. Add the following on line 2.

    auto wlan0
    
  13. sudo service networking restart (if you are connected via SSH or VNC, you will be disconnected)

  14. Use ifconfig wlan0 to determine your current wireless IP address.

Speak IP Address On Boot

  1. Open a terminal.

  2. sudo apt-get install festival festvox-kallpc16k

  3. leafpad /home/pi/sayip.sh

  4. Enter the following.

    #!/usr/bin/env bash
    # Say the IP address
    _IP=$(hostname -I)
    if [ "$_IP" ]; then
      MY_IP=`hostname -I | sed -e 's/\./ dot /g' -e 's/[0123456789]/ & /g'`
      echo "Hello, this is Raspberry Pie. My I P address is $MY_IP" | /usr/bin/festival --tts
    fi
    exit 0
    
  5. chmod +x /home/pi/sayip.sh

  6. sudo leafpad /etc/network/interfaces

  7. Append the following to both the iface eth0 and iface wlan0 stanza.

    post-up /home/pi/sayip.sh
    
  8. amixer cset numid=3 1

  9. Connect a speaker or headphones to the audio jack.

  10. Test your script by running /home/pi/sayip.sh

  11. sudo reboot

Set Timezone

  1. sudo dpkg-reconfigure tzdata
  2. Select "America/Los_Angeles"

Synchronize with Network Time Server

This will keep your clock synchronized with the pool.ntp.org NTP time server. This will persist across reboots.

  1. sudo apt-get update
  2. sudo apt-get install ntpdate

Disable video blank

  1. Open a terminal.

  2. sudo leafpad /etc/X11/xinit/xinitrc (or /etc/xdg/lxsession/LXDE/autostart)

  3. Enter the following

    @xset s off
    @xset -dpms
    @xset s noblank
    
  4. sudo leafpad /etc/lightdm/lightdm.conf

  5. Enter the following under the [SeatDefault] section

    xserver-command=X -s 0 dpms
    

Auto-start Console Program

  1. Open a terminal.
  2. sudo leafpad /etc/rc.local
  3. Before the exit 0 (last line), add the absolute path to your program followed by an ampersand (e.g. /path/to/program.sh &) to the script you wish to have started automatically on boot.

Auto-start GUI Program

  1. Open a terminal.

  2. mkdir -p /home/pi/.config/autostart/

  3. leafpad /home/pi/.config/autostart/program.desktop

  4. Add the following (Exec to point to the absolute path to your program).

    [Desktop Entry] 
    Type=Application
    Exec=/path/to/program.sh
    

Auto-start Console Program in a GUI Terminal

This is useful during development because it allows you to easily see your console program terminal output and to be able to terminate it easily (Ctrl-C).

  1. Open a terminal.

  2. mkdir -p /home/pi/.config/autostart/

  3. leafpad /home/pi/.config/autostart/console_program.desktop

    [Desktop Entry]
    Type=Application
    Terminal=false
    Exec=lxterminal --command "/path/to/console/program.sh"
    

Disable sudo Password

See #SUDOERS at http://www.raspberrypi.org/documentation/linux/usage/users.md.

Specifications

CPU and Memory

  • Broadcom BCM2836 SoC

  • 900MHz quad-core ARM Cortex-A7 CPU (ARMv7 instruction set)

  • Hardware floating point

  • 1GB LPDDR2 RAM (shared with GPU)

  • VideoCore IV 3D graphics core

  • Broadcom VideoCore IV @ 250 MHz, OpenGL ES 2.0 (24 GFLOPS), 1080p30 MPEG-2 and VC-1 decoder (with license), 1080p30 h.264/MPEG-4 AVC high-profile decoder and encoder

  • No on-board flash memory

I/O

  • 4 USB 2.0 ports

  • 40 GPIO pins 2.54 mm (100 mil) expansion header: 2x20 strip

  • Providing 27 GPIO pins as well as +3.3 V, +5 V and GND supply lines GPIO header pin-out

  • Full-sized HDMI (rev 1.3 & 1.4) port

  • 10/100 Ethernet port

  • Combined 3.5mm audio jack and composite video

  • Camera interface (CSI)

  • Display interface (DSI)

  • MicroSD (SDIO) card slot

  • JTAG (not populated)

  • Only one PWM channel (GPIO18)

  • No analog input/output 😦

  • For analog to digital input and output conversion or if you require a smooth analog output, get an 8-bit ADC/DAC I2C device.

  • For analog input and PWM output, add an Arduino to your project using a Proto Hat, 4-channel MOSFET level shifter, and a Breaduino.