SlideShare una empresa de Scribd logo
1 de 20
Lloyd Moore, President
   Lloyd@CyberData-Robotics.com
    www.CyberData-Robotics.com
Seattle Robotics Society 1/19/2013
Agenda
Overview of the Raspberry Pi
Installing the OS
Setting up VNC
Setting up Qt locally
Serial port communications
Resources
Using a Mac
Overview of the Raspberry Pi (Model B)
                  Broadcom BCM2835 SOC
                   •   700 Mhz ARM 11 processor
                   •   Hardware floating point
                   •   Videocore 4 GPU (Open GL ES2.0)

                  512 MB RAM + SD Card for mass storage
                  Camera connector – camera coming soon!
                  JTAG connector
                  Low level I/O
                   •   12 GPIO
                   •   UART (3.3V TTL)
                   •   SPI, with two CS lines
                   •   I2C

                  Full schematics available
Additional Hardware
To get started with the system you will need to add:
    • USB Keyboard
    • USB Mouse
    • SD Memory Card: 4GB or larger, Class 10 or better
    • Micro USB cable (Dollar stores have these cheap, and so does Amazon!
      http://www.amazon.com/gp/product/B003ES5ZSW/ref=oh_details_o00_s00_i01 )
    • 5V USB Power Plug, 700mA or better (Can also use a bench supply, etc.)
    • Ethernet cable and wired network, wireless USB adapters also available
    • HDMI cable and monitor
     • Can also use HDMI to DVI converter/cable (Amazon has these cheap!
        http://www.amazon.com/gp/product/B004S4R5CK/ref=oh_details_o00_s00_i0o)


May also want:
•       Multiple SD cards – really handy for experimenting
•       1/8” stereo audio cable
•       26 position IDC connectors and ribbon cable (Fry’s)
•       USB hub
Installing the OS
Image will be placed directly onto the SD card using a Windows PC (can also
use Linux or Mac for this step with appropriate software).
1. Download and install Win32DiskImage from:
   https://launchpad.net/win32-image-writer/+download
2. Download the “Raspbian wheezy” image from:
   http://www.raspberrypi.org/downloads
 1. This is a Debian based Linux image using hardware floating point and LXDE

3. Insert the SD Card into your computer THEN run Win32DiskImage
 1. May get an error message “Incorrect Function”, just ignore it

4. Select the SD Card and image to load, then press “Write” – copy will take
   some time!
First OS Run
Install the SD card, attach USB keyboard, USB mouse, monitor into the Pi and apply power
to the Pi.




First screen configuration
1.   Set time zone

2.   Set memory allocation between CPU and GPU, 448M/64M standard

3.   Enable SSH, if desired

4.   Set boot behavior – straight to desktop or not, we’ll turn this on for now

5.   Expand_rootfs and reboot



Use the command sudo raspi-config to run the configuration program at any time after the
first boot.
Demo – Walk around the OS
Points of Interest
          Start Menu Button
          Logout Button
          Multiple Desktops
          File Manager
          CPU Graph
          LX Terminal
          nano
At this point you should also update the OS!
1. Open LX Terminal
2. sudo apt-get update
3. sudo apt-get upgrade
Setup VNC – Optional Step
By setting up VNC you eliminate the need for a dedicated keyboard, mouse
and monitor for the Raspberry Pi.
1. Open a command window: Accessories -> LXTerminal
2. Type: sudo apt-get install tightvncserver
3. Run vncserver and enter a password – srs_demo for the demo image
4. Edit /etc/init.d/bootmisc.sh to start vnc server on boot up
 A. sudo nano /etc/init.d/bootmisc.sh
 B. Scroll to end of text and add:
       su –c “vncserver :1 –geometry 1200x800 – depth 16” pi &
 C. Ctl-o, Ctl-x to save and exit
 D. Note: There are other more formal ways to do this – this one is simple!

5. Download and install Tight VNC Viewer for your desktop from:
   http://www.tightvnc.com/download.php
Setup Qt Development Environment
From a console window type:
   sudo apt-get install g++-4.7
   sudo apt-get install qt4-dev-tools
   sudo apt-get install qtcreator



Qt Creator will now show up in the programming menu:
Configure Your Tool Chain
Start Qt Creator and then choose Tools->Options->Build&Run->Tool Chains
Configure as shown by clicking Add->GCC:
Configure Qt Versions
On the same panel choose Qt Versions and configure as shown (may already
be configured):
Configuring the Serial Port
3 wire serial port located on GPIO Pins 6 (GND), 8(Tx), 10(Rx)
Device name is: /dev/ttyAMA0
Voltage levels are 3.3V, and directly connected to SOC!!!! The good news is
this will directly connect to a microcontroller! Not good for a PC!


I’m using a level shifter for the demo to connect to the PC. AdaFruit has one
for $10 (http://adafruit.com/products/954)
Default is to use this for an OS console port, need to disable functionality:
Configuring the Serial Port
Disable the console output in /boot/cmdline.txt
• In a console window type:
       sudo nano /boot/cmdline.txt
       Remove all references to /dev/ttyAMA0
       Ctl-o <Enter> Ctl-x (to write the file back out and exit)
  • Typical modified line will appear as:
     dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline
     rootwait

Disable the getty in /etc/inittab
In a console window type:
• sudo nano /etc/inittab
• comment last line: T0:23: respawn /sbin/getty –L ttyAMA0 115200 vt100
• Ctl-o <Enter> Ctl-x (to write the file back out and exit)

Restart the Raspberry Pi for this to take effect
• sudo reboot
The Demo Program
Can use standard GCC/Eclipse to program, however Qt provides a nice IDE
and is cross platform environment (Windows, Linux, Mac, Android,
Embedded Linux, Windows CE, iOS on the way)
And it is FREE! (LGPL v2.1 and commercial licenses available)
Will also be using QtExtSerialPort, a free Qt compatible serial port
abstraction (MIT license)
Will simply open the serial port set 57600N81 and send out “Hello World”


Located in ~/SerialPi/SerialPi in the demo image, the project file is named
SerialPi.pro
Configure SerialPi Project
The first time you open the SerialPi project you will be asked to configure it
for the types of builds that you want to create. Configure the project as
shown:
Configure No Deployment Runtime
Normally for embedded development you build on a host computer and
deploy to a target computer. This can be faster overall but is much more
complex to set up.
To configure this project to run locally choose:
1.   Deployment: Projects->Run Settings,
2.   Run: Add->Deploy Configuration and set the path to the executable
Demo – Run Program in Qt
Few More Things
Gertboard Kit– Plugs into the IO header on the Raspberry Pi and contains:
         12 buffered I/O lines
         3 pushbutton switches
         6 open collector drivers (50V 0.5A)
         48V 4A motor controller
         28 pin, DIP, Atmega controller
         2 channel 12 bit ADC
         2 channel 10 bit DAC
BCM2835 Library – Open source library containing drivers and examples for:
         SPI
         GPIO
Adapteva Project - $99 board, 16 cores, 26GFLOPS:
http://arstechnica.com/information-technology/2012/09/99-raspberry-pi-sized-
supercomputer-touted-in-kickstarter-project/
Using a Mac to Create the SD Card
Use Stuffit to unzip the download file (http://www.stuffit.com/mac-expander.html)

To set up the SD card:
• Insert the SD card into a card reader. I used the built-in card reader on my MacBook Air.
• The card should show up in the Finder. Run Disk Utility (from the Applications/Utilities folder), find the SD card on the left,
  select the volume associated with that device, and then click on the "Unmount" button. This unmounts the volume but leaves
  the card connected we can blast it with the disk image. Do not click on the “Eject” button as this will also disconnect the card,
  and we won’t be able to talk to it.
• Now we need to figure out the low-level (BSD) name to use to access the SD card. In Disk Utility, click on the item for the card
  reader and then click on the Info button at the top of the window. In the resulting window, you should see a line with the "disk
  identifier". On the MacBook Air it's "disk2", on the Mac Pro it's "disk5". Note that you want the disk identifier of the card, not
  the name of the volume (partition) on the card, which is generally something like “disk2s1”. If you get a volume device name,
  you need to click on the parent item, which is typically the name of the card reader, then choose Info.
• Run the Terminal application
• “cd” to the directory with the file decoded from the zip. If you haven't used the command line before and have no idea what I'm
  talking about, you can just move the SrsRaspPiDemo2.img file to your home folder, the folder the OS creates with your login
  name and holds all of your other folders, like Documents and Downloads.
• Finally, we're going the use the dd command to transfer the image onto the card. A note of caution: this lets you blast data
  directly onto a drive, INSTANTLY destroying any data already there. That's a good thing, it's what we want to do, BUT if you
  get the wrong BSD name or do something stupid like swap the arguments, you can COMPLETELY trash your valuable data.
  BE CAREFUL!!! If you've done the steps above correctly, type the command below, replacing <diskX> with the disk identifier
  you found in the step above. The "if" argument means "input file" and "of" means "output file" so the command above says
  input the disk image file and output to the card reader.


      • dd if=SrsRaspPiDemo2.img of=/dev/<diskX>
The transfer will take about 2 -3 hours depending on your system, this is normal and there is very
little feedback – good time for having dinner!
References
Raspberry Pi Home Page: http://www.raspberrypi.org/
Tight VNC Home Page: http://www.tightvnc.com/
Qt Home Page: http://qt-project.org/
QExtSerialPort Home Page: http://code.google.com/p/qextserialport/
Gertboard: http://www.raspberrypi.org/archives/tag/gertboard
BCM2835 Drivers: http://www.open.com.au/mikem/bcm2835/index.html
BCM2835 Peripherals Datasheet: http://www.raspberrypi.org/wp-
content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
MagPi Magazine: http://www.themagpi.com/
Image of today’s session (8GB SD Card): http://www.CyberData-
Robotics/Transfer/RaspPiImage.zip (Will be available until 2/28/2013)

Más contenido relacionado

La actualidad más candente

Raymond Payne: How to Build a Computer - Hardware Basics
Raymond Payne: How to Build a Computer - Hardware BasicsRaymond Payne: How to Build a Computer - Hardware Basics
Raymond Payne: How to Build a Computer - Hardware BasicsRaymond Payne
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_BootingRashila Rr
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Macpaul Lin
 
Readme
ReadmeReadme
ReadmeTealc1
 
U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New HardwareRuggedBoardGroup
 
Aplus essentials-exam-cram
Aplus essentials-exam-cramAplus essentials-exam-cram
Aplus essentials-exam-cramPeter Sonko
 
Embedding Linux On The Encore Simputer
Embedding Linux On The Encore SimputerEmbedding Linux On The Encore Simputer
Embedding Linux On The Encore SimputerSatpal Parmar
 
Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Thomas Petazzoni
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)RuggedBoardGroup
 
Computer systems|Computer Networking & Communication System Assignment - Netw...
Computer systems|Computer Networking & Communication System Assignment - Netw...Computer systems|Computer Networking & Communication System Assignment - Netw...
Computer systems|Computer Networking & Communication System Assignment - Netw...freeassignmenthelp
 
Intrack14dec tips tricks_clean
Intrack14dec tips tricks_cleanIntrack14dec tips tricks_clean
Intrack14dec tips tricks_cleanchinitooo
 
Linux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emptionLinux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emptionHemanth Venkatesh
 

La actualidad más candente (19)

Hardware
HardwareHardware
Hardware
 
Raymond Payne: How to Build a Computer - Hardware Basics
Raymond Payne: How to Build a Computer - Hardware BasicsRaymond Payne: How to Build a Computer - Hardware Basics
Raymond Payne: How to Build a Computer - Hardware Basics
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
 
Readme
ReadmeReadme
Readme
 
2.3
2.32.3
2.3
 
U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New Hardware
 
Aplus essentials-exam-cram
Aplus essentials-exam-cramAplus essentials-exam-cram
Aplus essentials-exam-cram
 
Ps3 linux
Ps3 linuxPs3 linux
Ps3 linux
 
Embedding Linux On The Encore Simputer
Embedding Linux On The Encore SimputerEmbedding Linux On The Encore Simputer
Embedding Linux On The Encore Simputer
 
Building
BuildingBuilding
Building
 
Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
Hw notes- aim Technologies
Hw notes- aim TechnologiesHw notes- aim Technologies
Hw notes- aim Technologies
 
UNIT 2 P1
UNIT 2 P1UNIT 2 P1
UNIT 2 P1
 
Computer systems|Computer Networking & Communication System Assignment - Netw...
Computer systems|Computer Networking & Communication System Assignment - Netw...Computer systems|Computer Networking & Communication System Assignment - Netw...
Computer systems|Computer Networking & Communication System Assignment - Netw...
 
Intrack14dec tips tricks_clean
Intrack14dec tips tricks_cleanIntrack14dec tips tricks_clean
Intrack14dec tips tricks_clean
 
Linux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emptionLinux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emption
 
Dx diag
Dx diagDx diag
Dx diag
 

Similar a Starting Raspberry Pi

Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PICliff Samuels Jr.
 
computer archtecture lab, computer hardware , problem and solutons in computer
computer archtecture lab, computer hardware , problem and solutons in computercomputer archtecture lab, computer hardware , problem and solutons in computer
computer archtecture lab, computer hardware , problem and solutons in computerGS Kosta
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadAndrewWright224
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220AndrewWright224
 
Raspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMooreRaspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMooreBenjamin Moore
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Codemotion
 
Raspberry with laptop
Raspberry with laptopRaspberry with laptop
Raspberry with laptopProf Kingstan
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitSulamita Garcia
 
Presentation on Computer Peripheral by Atharva Jawalkar
Presentation on Computer Peripheral by Atharva JawalkarPresentation on Computer Peripheral by Atharva Jawalkar
Presentation on Computer Peripheral by Atharva JawalkarAtharva Jawalkar
 
Raspberry pi technical documentation
Raspberry pi technical documentationRaspberry pi technical documentation
Raspberry pi technical documentationGR Techno Solutions
 
Raspberry Pi tutorial
Raspberry Pi tutorialRaspberry Pi tutorial
Raspberry Pi tutorial艾鍗科技
 
Computer Systems Servicing COC1-COC2
Computer Systems Servicing COC1-COC2Computer Systems Servicing COC1-COC2
Computer Systems Servicing COC1-COC2melody77776
 

Similar a Starting Raspberry Pi (20)

Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
 
Beagle board101 esc-boston-2009b
Beagle board101 esc-boston-2009bBeagle board101 esc-boston-2009b
Beagle board101 esc-boston-2009b
 
101 1.1 hardware settings
101 1.1 hardware settings101 1.1 hardware settings
101 1.1 hardware settings
 
computer archtecture lab, computer hardware , problem and solutons in computer
computer archtecture lab, computer hardware , problem and solutons in computercomputer archtecture lab, computer hardware , problem and solutons in computer
computer archtecture lab, computer hardware , problem and solutons in computer
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPad
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220
 
Raspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMooreRaspi_TOR_Access_Point_BenMoore
Raspi_TOR_Access_Point_BenMoore
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
Raspberry with laptop
Raspberry with laptopRaspberry with laptop
Raspberry with laptop
 
Getting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer KitGetting started with Intel IoT Developer Kit
Getting started with Intel IoT Developer Kit
 
Presentation on Computer Peripheral by Atharva Jawalkar
Presentation on Computer Peripheral by Atharva JawalkarPresentation on Computer Peripheral by Atharva Jawalkar
Presentation on Computer Peripheral by Atharva Jawalkar
 
Raspberry pi technical documentation
Raspberry pi technical documentationRaspberry pi technical documentation
Raspberry pi technical documentation
 
Hardware hacking
Hardware hackingHardware hacking
Hardware hacking
 
How to Hack Edison
How to Hack EdisonHow to Hack Edison
How to Hack Edison
 
Feature satip4
Feature satip4Feature satip4
Feature satip4
 
Raspberry Pi tutorial
Raspberry Pi tutorialRaspberry Pi tutorial
Raspberry Pi tutorial
 
Computer Systems Servicing COC1-COC2
Computer Systems Servicing COC1-COC2Computer Systems Servicing COC1-COC2
Computer Systems Servicing COC1-COC2
 
Feature satip4
Feature satip4Feature satip4
Feature satip4
 
Feature satip4
Feature satip4Feature satip4
Feature satip4
 
Feature satip4
Feature satip4Feature satip4
Feature satip4
 

Más de LloydMoore

Less Magical Numbers - A coding standard proposal
Less Magical Numbers - A coding standard proposalLess Magical Numbers - A coding standard proposal
Less Magical Numbers - A coding standard proposalLloydMoore
 
Debugging Intermittent Issues - A How To
Debugging Intermittent Issues - A How ToDebugging Intermittent Issues - A How To
Debugging Intermittent Issues - A How ToLloydMoore
 
Successful Software Projects - What you need to consider
Successful Software Projects - What you need to considerSuccessful Software Projects - What you need to consider
Successful Software Projects - What you need to considerLloydMoore
 
A Slice Of Rust - A quick look at the Rust programming language
A Slice Of Rust - A quick look at the Rust programming languageA Slice Of Rust - A quick look at the Rust programming language
A Slice Of Rust - A quick look at the Rust programming languageLloydMoore
 
What Have We Lost - A look at some historical techniques
What Have We Lost - A look at some historical techniquesWhat Have We Lost - A look at some historical techniques
What Have We Lost - A look at some historical techniquesLloydMoore
 
Raspberry pi robotics
Raspberry pi roboticsRaspberry pi robotics
Raspberry pi roboticsLloydMoore
 
High Reliabilty Systems
High Reliabilty SystemsHigh Reliabilty Systems
High Reliabilty SystemsLloydMoore
 
Real Time Debugging - What to do when a breakpoint just won't do
Real Time Debugging - What to do when a breakpoint just won't doReal Time Debugging - What to do when a breakpoint just won't do
Real Time Debugging - What to do when a breakpoint just won't doLloydMoore
 
Using PSoC Creator
Using PSoC CreatorUsing PSoC Creator
Using PSoC CreatorLloydMoore
 
Using the Cypress PSoC Processor
Using the Cypress PSoC ProcessorUsing the Cypress PSoC Processor
Using the Cypress PSoC ProcessorLloydMoore
 
C for Microcontrollers
C for MicrocontrollersC for Microcontrollers
C for MicrocontrollersLloydMoore
 

Más de LloydMoore (12)

Less Magical Numbers - A coding standard proposal
Less Magical Numbers - A coding standard proposalLess Magical Numbers - A coding standard proposal
Less Magical Numbers - A coding standard proposal
 
Debugging Intermittent Issues - A How To
Debugging Intermittent Issues - A How ToDebugging Intermittent Issues - A How To
Debugging Intermittent Issues - A How To
 
Successful Software Projects - What you need to consider
Successful Software Projects - What you need to considerSuccessful Software Projects - What you need to consider
Successful Software Projects - What you need to consider
 
A Slice Of Rust - A quick look at the Rust programming language
A Slice Of Rust - A quick look at the Rust programming languageA Slice Of Rust - A quick look at the Rust programming language
A Slice Of Rust - A quick look at the Rust programming language
 
What Have We Lost - A look at some historical techniques
What Have We Lost - A look at some historical techniquesWhat Have We Lost - A look at some historical techniques
What Have We Lost - A look at some historical techniques
 
Raspberry pi robotics
Raspberry pi roboticsRaspberry pi robotics
Raspberry pi robotics
 
High Reliabilty Systems
High Reliabilty SystemsHigh Reliabilty Systems
High Reliabilty Systems
 
Real Time Debugging - What to do when a breakpoint just won't do
Real Time Debugging - What to do when a breakpoint just won't doReal Time Debugging - What to do when a breakpoint just won't do
Real Time Debugging - What to do when a breakpoint just won't do
 
PSoC USB HID
PSoC USB HIDPSoC USB HID
PSoC USB HID
 
Using PSoC Creator
Using PSoC CreatorUsing PSoC Creator
Using PSoC Creator
 
Using the Cypress PSoC Processor
Using the Cypress PSoC ProcessorUsing the Cypress PSoC Processor
Using the Cypress PSoC Processor
 
C for Microcontrollers
C for MicrocontrollersC for Microcontrollers
C for Microcontrollers
 

Último

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Último (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Starting Raspberry Pi

  • 1. Lloyd Moore, President Lloyd@CyberData-Robotics.com www.CyberData-Robotics.com Seattle Robotics Society 1/19/2013
  • 2. Agenda Overview of the Raspberry Pi Installing the OS Setting up VNC Setting up Qt locally Serial port communications Resources Using a Mac
  • 3. Overview of the Raspberry Pi (Model B) Broadcom BCM2835 SOC • 700 Mhz ARM 11 processor • Hardware floating point • Videocore 4 GPU (Open GL ES2.0) 512 MB RAM + SD Card for mass storage Camera connector – camera coming soon! JTAG connector Low level I/O • 12 GPIO • UART (3.3V TTL) • SPI, with two CS lines • I2C Full schematics available
  • 4. Additional Hardware To get started with the system you will need to add: • USB Keyboard • USB Mouse • SD Memory Card: 4GB or larger, Class 10 or better • Micro USB cable (Dollar stores have these cheap, and so does Amazon! http://www.amazon.com/gp/product/B003ES5ZSW/ref=oh_details_o00_s00_i01 ) • 5V USB Power Plug, 700mA or better (Can also use a bench supply, etc.) • Ethernet cable and wired network, wireless USB adapters also available • HDMI cable and monitor • Can also use HDMI to DVI converter/cable (Amazon has these cheap! http://www.amazon.com/gp/product/B004S4R5CK/ref=oh_details_o00_s00_i0o) May also want: • Multiple SD cards – really handy for experimenting • 1/8” stereo audio cable • 26 position IDC connectors and ribbon cable (Fry’s) • USB hub
  • 5. Installing the OS Image will be placed directly onto the SD card using a Windows PC (can also use Linux or Mac for this step with appropriate software). 1. Download and install Win32DiskImage from: https://launchpad.net/win32-image-writer/+download 2. Download the “Raspbian wheezy” image from: http://www.raspberrypi.org/downloads 1. This is a Debian based Linux image using hardware floating point and LXDE 3. Insert the SD Card into your computer THEN run Win32DiskImage 1. May get an error message “Incorrect Function”, just ignore it 4. Select the SD Card and image to load, then press “Write” – copy will take some time!
  • 6. First OS Run Install the SD card, attach USB keyboard, USB mouse, monitor into the Pi and apply power to the Pi. First screen configuration 1. Set time zone 2. Set memory allocation between CPU and GPU, 448M/64M standard 3. Enable SSH, if desired 4. Set boot behavior – straight to desktop or not, we’ll turn this on for now 5. Expand_rootfs and reboot Use the command sudo raspi-config to run the configuration program at any time after the first boot.
  • 7. Demo – Walk around the OS Points of Interest Start Menu Button Logout Button Multiple Desktops File Manager CPU Graph LX Terminal nano At this point you should also update the OS! 1. Open LX Terminal 2. sudo apt-get update 3. sudo apt-get upgrade
  • 8. Setup VNC – Optional Step By setting up VNC you eliminate the need for a dedicated keyboard, mouse and monitor for the Raspberry Pi. 1. Open a command window: Accessories -> LXTerminal 2. Type: sudo apt-get install tightvncserver 3. Run vncserver and enter a password – srs_demo for the demo image 4. Edit /etc/init.d/bootmisc.sh to start vnc server on boot up A. sudo nano /etc/init.d/bootmisc.sh B. Scroll to end of text and add: su –c “vncserver :1 –geometry 1200x800 – depth 16” pi & C. Ctl-o, Ctl-x to save and exit D. Note: There are other more formal ways to do this – this one is simple! 5. Download and install Tight VNC Viewer for your desktop from: http://www.tightvnc.com/download.php
  • 9. Setup Qt Development Environment From a console window type: sudo apt-get install g++-4.7 sudo apt-get install qt4-dev-tools sudo apt-get install qtcreator Qt Creator will now show up in the programming menu:
  • 10. Configure Your Tool Chain Start Qt Creator and then choose Tools->Options->Build&Run->Tool Chains Configure as shown by clicking Add->GCC:
  • 11. Configure Qt Versions On the same panel choose Qt Versions and configure as shown (may already be configured):
  • 12. Configuring the Serial Port 3 wire serial port located on GPIO Pins 6 (GND), 8(Tx), 10(Rx) Device name is: /dev/ttyAMA0 Voltage levels are 3.3V, and directly connected to SOC!!!! The good news is this will directly connect to a microcontroller! Not good for a PC! I’m using a level shifter for the demo to connect to the PC. AdaFruit has one for $10 (http://adafruit.com/products/954) Default is to use this for an OS console port, need to disable functionality:
  • 13. Configuring the Serial Port Disable the console output in /boot/cmdline.txt • In a console window type: sudo nano /boot/cmdline.txt Remove all references to /dev/ttyAMA0 Ctl-o <Enter> Ctl-x (to write the file back out and exit) • Typical modified line will appear as: dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait Disable the getty in /etc/inittab In a console window type: • sudo nano /etc/inittab • comment last line: T0:23: respawn /sbin/getty –L ttyAMA0 115200 vt100 • Ctl-o <Enter> Ctl-x (to write the file back out and exit) Restart the Raspberry Pi for this to take effect • sudo reboot
  • 14. The Demo Program Can use standard GCC/Eclipse to program, however Qt provides a nice IDE and is cross platform environment (Windows, Linux, Mac, Android, Embedded Linux, Windows CE, iOS on the way) And it is FREE! (LGPL v2.1 and commercial licenses available) Will also be using QtExtSerialPort, a free Qt compatible serial port abstraction (MIT license) Will simply open the serial port set 57600N81 and send out “Hello World” Located in ~/SerialPi/SerialPi in the demo image, the project file is named SerialPi.pro
  • 15. Configure SerialPi Project The first time you open the SerialPi project you will be asked to configure it for the types of builds that you want to create. Configure the project as shown:
  • 16. Configure No Deployment Runtime Normally for embedded development you build on a host computer and deploy to a target computer. This can be faster overall but is much more complex to set up. To configure this project to run locally choose: 1. Deployment: Projects->Run Settings, 2. Run: Add->Deploy Configuration and set the path to the executable
  • 17. Demo – Run Program in Qt
  • 18. Few More Things Gertboard Kit– Plugs into the IO header on the Raspberry Pi and contains: 12 buffered I/O lines 3 pushbutton switches 6 open collector drivers (50V 0.5A) 48V 4A motor controller 28 pin, DIP, Atmega controller 2 channel 12 bit ADC 2 channel 10 bit DAC BCM2835 Library – Open source library containing drivers and examples for: SPI GPIO Adapteva Project - $99 board, 16 cores, 26GFLOPS: http://arstechnica.com/information-technology/2012/09/99-raspberry-pi-sized- supercomputer-touted-in-kickstarter-project/
  • 19. Using a Mac to Create the SD Card Use Stuffit to unzip the download file (http://www.stuffit.com/mac-expander.html) To set up the SD card: • Insert the SD card into a card reader. I used the built-in card reader on my MacBook Air. • The card should show up in the Finder. Run Disk Utility (from the Applications/Utilities folder), find the SD card on the left, select the volume associated with that device, and then click on the "Unmount" button. This unmounts the volume but leaves the card connected we can blast it with the disk image. Do not click on the “Eject” button as this will also disconnect the card, and we won’t be able to talk to it. • Now we need to figure out the low-level (BSD) name to use to access the SD card. In Disk Utility, click on the item for the card reader and then click on the Info button at the top of the window. In the resulting window, you should see a line with the "disk identifier". On the MacBook Air it's "disk2", on the Mac Pro it's "disk5". Note that you want the disk identifier of the card, not the name of the volume (partition) on the card, which is generally something like “disk2s1”. If you get a volume device name, you need to click on the parent item, which is typically the name of the card reader, then choose Info. • Run the Terminal application • “cd” to the directory with the file decoded from the zip. If you haven't used the command line before and have no idea what I'm talking about, you can just move the SrsRaspPiDemo2.img file to your home folder, the folder the OS creates with your login name and holds all of your other folders, like Documents and Downloads. • Finally, we're going the use the dd command to transfer the image onto the card. A note of caution: this lets you blast data directly onto a drive, INSTANTLY destroying any data already there. That's a good thing, it's what we want to do, BUT if you get the wrong BSD name or do something stupid like swap the arguments, you can COMPLETELY trash your valuable data. BE CAREFUL!!! If you've done the steps above correctly, type the command below, replacing <diskX> with the disk identifier you found in the step above. The "if" argument means "input file" and "of" means "output file" so the command above says input the disk image file and output to the card reader. • dd if=SrsRaspPiDemo2.img of=/dev/<diskX> The transfer will take about 2 -3 hours depending on your system, this is normal and there is very little feedback – good time for having dinner!
  • 20. References Raspberry Pi Home Page: http://www.raspberrypi.org/ Tight VNC Home Page: http://www.tightvnc.com/ Qt Home Page: http://qt-project.org/ QExtSerialPort Home Page: http://code.google.com/p/qextserialport/ Gertboard: http://www.raspberrypi.org/archives/tag/gertboard BCM2835 Drivers: http://www.open.com.au/mikem/bcm2835/index.html BCM2835 Peripherals Datasheet: http://www.raspberrypi.org/wp- content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf MagPi Magazine: http://www.themagpi.com/ Image of today’s session (8GB SD Card): http://www.CyberData- Robotics/Transfer/RaspPiImage.zip (Will be available until 2/28/2013)