Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Raspberry Pi

Avatar for Dan Dan
November 10, 2012

Raspberry Pi

Talk for South Dakota Code Camp 2012 about the Raspberry Pi and Embedded Development.

Avatar for Dan

Dan

November 10, 2012
Tweet

Other Decks in Technology

Transcript

  1. Raspberry Pi (it’s an embedded device and it can run

    Linux) http://www.raspberrypi.org/
  2. Idea • Low Cost • Low Barrier to Entry –

    TV – USB Keyboard – USB Mouse • Educational • and still General Purpose! http://www.raspberrypi.org/
  3. Initial Setup of Raspbian • Write image to 2GB (or

    larger) SD card – Some issues with 32GB class 10 cards (mine did not work) • Boot! – HDMI, keyboard, USB power connected at a minimum – Optionally a TTL level UART • Initial Setup demo – Minor cheating (Static IP, setup via SSH) http://www.raspberrypi.org/
  4. Hardware • BCM2835 System on Chip • Composite Video •

    HDMI • 1/8 ” Stereo Jack • USB Micro-B for Power – Possible to power from USB port on newer TVs http://www.raspberrypi.org/
  5. Hardware Variety • Model A ($25) – 256 MB RAM

    – USB (1 port) • Model B ($35) – 512 MB RAM (Oct. 15) – USB Hub (2 ports) – USB Ethernet http://www.raspberrypi.org/
  6. Interesting Hardware Details • BCM2835 – Broadcom System on Chip

    • ARM1176JZF-S CPU (with Vector Floating Point Core) • Many built-in peripherals ... – Package-on-Package assembly for DDR3 • Low Profile DDR3 http://www.raspberrypi.org/
  7. BCM2835 Peripherals • Mostly on 2x13 Pin Strip Header –

    GPIO (General Purpose Input / Output) – UART (Serial Port, for console access, TTL levels) • Kernel Boot Messages – PWM (Pulse Width Modulation) – SPI (Serial Peripheral Interface) • Shared bus with all slave peripherals – I2C (Inter-Integrated Circuit or Two-Wire Interface) • Point to Point • Simple Interface – SCL (serial clock) – SDA (serial data) http://www.raspberrypi.org/
  8. GPIO • Very easy to control “something” • Web Application

    to control is available! – http://code.google.com/p/webiopi/ • webiopi / LED demo http://www.raspberrypi.org/
  9. I2C • Very common for simple sensors – For example,

    the LM75 Temperature Sensor • Not quite out of the box ... – Comment out “blacklist i2c-bcm2708” in /etc/modprobe.d/raspi-blacklist.conf – modprobe i2c-bcm2708 – modprobe i2c-dev • LM75 demo http://www.raspberrypi.org/
  10. Enough Power to ... • Play 1080p Video – BCM2835

    GPU includes H.264 decoder – Can license MPEG2 decoder • $3.82 – Can license VC-1 (Microsoft’s codec) • $1.91 – Audio decoded on ARM CPU • omxplayer demo – https://github.com/huceke/omxplayer – Prototype “OpenMAX” GPU API for XBMC Project – Built on top of FFmpeg http://www.raspberrypi.org/
  11. Enough Power to ... • Browse the Web – Dillo

    1.5 seconds – NetSurf 5.2 seconds – Midori (WebKit-based) 6.8 seconds – Chromium (Google’s Chrome browser) 9.6 seconds – IceWeasel (Debian’s build of Firefox) 16 seconds • “Sorry,” no Adobe Flash support http://www.raspberrypi.org/
  12. Enough Power to ... • Run LibreOffice – writer 18

    seconds – calc 16 seconds – impress 17 seconds http://www.raspberrypi.org/
  13. Educational • Learn to program – gcc – python •

    IDLE (python IDE) – Can install other things using apt • Learn about hardware – Easy access to GPIO, SPI, and I2C http://www.raspberrypi.org/
  14. More Advanced Linux Usage • Create your own “distribution” –

    Buildroot • http://buildroot.uclibc.org/ • https://github.com/nezticle/RaspberryPi-BuildRoot – OpenEmbedded • http://www.openembedded.org/ • https://github.com/djwillis/meta-raspberrypi http://www.raspberrypi.org/
  15. More Advanced Linux Usage • Cross Compile C/C++ Code –

    Develop on another machine – Deploy binaries to the Raspberry Pi • ... or simply mount and run over the network – Build your own cross compiler • crosstool-ng • By hand (this isn’t much fun, but very educational) – Download a cross compiler • CodeSourcery (now from Mentor Graphics) – Debian multiarch magic! • Independent study! http://www.raspberrypi.org/
  16. Disk Space • Initial Raspbian has ~350MB free space •

    Beneficial to use a larger card and expand the filesystem • Demo 16GB SD card has ~2.8GB used http://www.raspberrypi.org/