Intro to the raspberry pi board


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Intro to the raspberry pi board

  1. 1. Introduction to the Raspberry Pi boardThierry GAYET – 22/10/2012
  2. 2. Agenda• A Little history  • More device specifics• What a Raspberry Pi  can do for you ?  • Other Emerging Embeded Platforms• Development Options• Possible live/video demo. • Questions
  3. 3. A Little history The Raspberry Pi was created by the Raspberry Pi Foundation toinspire a new generation of children to become programmers.Foundation trustee Eben Upton, a lecturer at Cambridge at the time,saw that the skillset of applicants to CS courses had been steadilydecreasing for a number of years. This is mostly due to the way thateducation has been geared more towards using office applications andless on understanding the hardware.The Debian images available have lots of tools for both kids and adultsalike. so almost any age 4-50+ can enjoy learning about programmingand electronics.
  4. 4. PriceModel A - $ 25Model B - $ 35Why so cheap ? SoC - System on a chip, a computer on a single low voltage chip Linux OS
  5. 5. More device specificsModel A256Mb RAM1 x USBno EthernetModel B256Mb RAM2 x USB1 x EthernetBoth models have a700MHz Armv6 (Arm11)Quad-Core Graphics chip Diagram of Model B
  6. 6. What a RaspberryPi can do for you• Xbmc @ Full 1080p HD• Linux desktop - just add keyboard and mouse.• Linux low powered server (fileserver etc..)• Attach webcam and monitoring software• Interface with electronics from leds, solenoids,switches,mosfets etc..• Almost anything else you can imagine
  7. 7. Other Emerging Embeded Platforms• VIA APC is powered by a VIA WonderMedia 8750 800 MHz ARM11 processor, 512MB of DDR3 memory, and 2GB of flash storage. The chip supports 1080p HD video playback, H.264 video encoding, and OpenGL ES 2.0 graphics.• Android Mk802 A10 AllWinner Mini Computer The little computer looks like a portable storage device, but it has a 1.5 GHz Allwiner A10 processor, 512MB(1Gb spotted) of RAM, and 4GB of storage. It ships with Google Android 4.0 software• Beagle Board (1GHZ ARM 7) and Beagle bone (720MHz ARM 7) also PandaBoard (all ~$80-$180)
  8. 8. Development Options• Python (Quick2wire),C(WiringPi), Bash, Basic, etc..• Scratch Geared to students and non-developers• Various Other Linux environments including Aros (Linux based port), Arch, Debian, Gentoo etc..• Many open-source libraries being ported to arm.• Cross-compiler tool-chains available. (both soft and hard float)
  9. 9. ScratchThe MIT program Scratch is designed to provide an accessible way forkids to learn about coding.The programs interface makes it easy to build and change software bydragging and dropping commands and changing variable valuesthrough simple menus.The version installed on the Pi comes loaded with a simple car-racinggame. Users can add and remove commands from the game, thenpress play and immediately see the effect of those changes - forinstance, tweaking how cars handle or adjusting the animation for carcrashes.
  10. 10. Scratch Example
  11. 11. Quick2Wire (Python GPIO)quick2wire have released a python api to safely access the gpio pinsfrom user land. eg. anyone in the gpio group. as well as allowing cleanimport and export of pins.Here’s the code that drives an LED:from quick2wire.gpio import Pinfrom time import sleepout_pin = Pin(12, Pin.Out) for i in range(0, 10): out_pin.value = 1 sleep(1) out_pin.value = 0 sleep(1)out_pin.unexport()
  12. 12.  My Raspberry Pi DemoMy demo focuses on input and output from python script through the gpio pins tosome simple electronics components.This simple demo takes input from a switchwhich illuminates a red led to confirm it waspressed.using the quick2wire api for python.when the switch is pressed a counter isincreased by 1 until it reaches 16 at whichpoint it will reset counter to 0.the corospoding value of counter at any onetime is then convirted to binary value anddisplayed on the 4 green and yellow counter = 3 bin outpit = 0011 led pin = 0011
  13. 13.  Raspberry Pi Demo
  14. 14.  Raspberry Pi Demo#!/usr/bin/python3import time # outputs binary reprisentation to 4 ledsimport string # that matches count.from quick2wire.gpio import Pin binvalue = bin(i)[2:].zfill(4) out_pin4.value = binvalue[-1]# import pins for output out_pin3.value = binvalue[-2]out_pin1 = Pin(11, Pin.Out) out_pin2.value = binvalue[-3]out_pin2 = Pin(13, Pin.Out) out_pin1.value = binvalue[-4]out_pin3 = Pin(15, Pin.Out) time.sleep(.2)out_pin4 = Pin(16, Pin.Out) # trap ctrl+c to cleanly unexport pins# import pins for input except KeyboardInterrupt:in_pin = Pin(7, Pin.In) out_pin1.unexport() out_pin2.unexport()# init count out_pin3.unexport()count = 0 out_pin4.unexport() in_pin.unexport()try:while True: # get input value of button mybutton = in_pin.value if mybutton == False: count = count + 1 # reset at 16 if count == 16: count = 0 @
  15. 15.  expEYES ProjectThe expEYES (“experiments for Young Engineers and Scientists”) aims toprovide a low cost platform for experimentation and education in electronics andphysics.The device has 12 bit Analog I/O, Digital I/O,time interval measurements, & other featuresaccessible from Python. It is packaged with anumber of accessories & software which canbe used to perform a large number ofexperiments.For example, the device can be used to studyelectromagnetic induction, the conductivity ofwater, to measure gravity by time of flight,alongside many other applications. It aims toenable anybody to develop new experiments.
  16. 16. Linux distro(s) “wheezy” : newbies get this one!Soft-float Debian “wheezy” : for Oracle JVMArch Linux ARM : down to the metalQtonPi : For Qt 5
  17. 17. Play Doom
  18. 18. Extra Item PriceRaspbery Pi $35.00Keyboard and Mouse $21.00Pretty Box $14.95USB Power Supply $5.95USB A/MicroB forPower $3.95HDMI Cable $5.95Ethernet cable $3.95USB Wifi $14.954GB SD Card $11.95 Connect to HDMI TV $0.00Total $117.65
  19. 19. Related book(s)Quick Start is Free: the book—paper ($12.38) or ebook ($6.60)
  20. 20. Any Questions ?
  21. 21. Any Questions ?