SlideShare a Scribd company logo
1 of 25
Getting Started with
Raspberry Pi (RPi)
By: Yeo Kheng Meng (yeokm1@gmail.com)
https://github.com/yeokm1/getting-started-with-rpi
Creative Crew (12 Aug 2016)
1
About me
• Hardware Engineer at Algo Access
• My Hardware projects with Arduino and Raspberry Pi
2
Who is this talk for?
• Beginners to the world of hardware
• People with Arduino experience
3
What is a Raspberry Pi (RPi)?
• The Raspberry Pi is a series of credit card-sized single-
board computers developed in the United Kingdom by
the Raspberry Pi Foundationto promote the teaching of
basic computer science in schools and developing
countries
• https://en.wikipedia.org/wiki/Raspberry_Pi
4
Types of Raspberry Pi
Model B+ (2014) 2 Model B (2015)
Model A+ (2014)
700Mhz single-core ARMv6
256MB Ram
1 USB port
No Ethernet port
700Mhz single-core ARMv6
512MB RAM
4 USB ports
Ethernet port
900Mhz quad-core ARMv7
1024MB Ram
4 USB ports
Ethernet port 5
3 Model B (2016)
1.2Ghz quad-core ARMv8
1024MB RAM
4 USB ports
Ethernet port, Wifi, Bluetooth
Zero (2015)
1Ghz single-core ARMv6
512MB RAM
1 USB OTG port
Micro-HDMI
Compute Module (2014)
700Mhz single-core ARMv6
512MB RAM
4GB onboard flash
SODIMM connector
Model B (2012)
700Mhz single-core ARMv6
256MB RAM
2 USB ports
Ethernet port
Obsolete (Do not purchase unless you have special reasons)
Special Mention
Arduino vs Raspberry Pi
Specs Arduino Uno Raspberry Pi 3 Model B
CPU type Microcontroller Microprocessor
Operating System None Linux (usually Raspbian) or Win 10
Speed 16 Mhz 1.2Ghz
RAM 2KB 1GB
GPU/Display None VideoCore IV GPU
Disk 32KB Depends on SD card
GPIO pins 14 digital pins (includes 6 analog) 26 digital pins
Other connectivity None USB, Ethernet, HDMI, audio
Power consumption 0.25W 6W
6
Minimum to get started
• Raspberry Pi 3
• HDMI monitor
• USB Keyboard
• USB Mouse
• 2.5 Amp USB Power Adapter
• Micro-USB cable
• 8GB Micro-SD card
• Computer to load initial card image
7
Step 1: Download SD card image
• Download *.img files from
• https://www.raspberrypi.org/downloads/
• https://www.raspberrypi.org/downloads/raspbian/
• Beginners should pick Raspbian Jessie
8
Step 2: Write image to SD card
• Windows computer
• https://sourceforge.net/projects/win32diskimager/
• Mac and Linux computer
• Get drive number of SD card
• sudo fdisk –l
• Write disk image to drive number N
• sudo dd if=path_of_your_image.img of=/dev/rdiskN bs=1m
9
Step 3: Boot Raspberry Pi from SD card
• Might take a few minutes for the first time
10
Step 4: Initial Configuration
• Set locale to Singapore
• Set keyboard layout to English (US)
• Configure locale and time zone
11
Step 5: Do a system update
• Connect to the Internet
• Open the terminal
• Look for new system updates
• sudo apt-get update
• Download and install latest updates
• sudo apt-get upgrade
• Recommend to reboot after that
12
Available Applications
• Web Browser: Epiphany
• Office Applications: Libreoffice
• Media Player: VLC
• Run: sudo apt-get install vlc
13
Raspbian default username/password
• Username: pi
• Password: raspberry
14
File System Directory layout
• /home/pi or “~”
• Your “Home” directory
• Removable Drives at
• /media/pi/….
15
Header pins
• 26 Digital-only General Purpose Input Output pins
• 3.3V logic levels
• Arduino uses 5V
16
Using the GPIO pins
• Python programming language
• LED
• Button
17
LED and Button Connection
18
Parts
• Breadboard
• Button
• 1x 10K ohm pull-down resistor
• Button
• 1x 220 ohm resistor
LED Blinky
• Blink LED at 1 second intervals using Python
• python led.py
19
LED and button code 1
• Button press supposed to toggle LED status
• python button1.py
20
LED and button code 2 (Debouncing)
• Button press now toggles LED correctly
• python button2.py
• Observe CPU usage: “ps aux | grep python” or Task Manager
21
LED and button code 3
• Toggle LED without sucking CPU resources by sleeping a little in the loop
• python button3.py
• Observe CPU usage: “ps aux | grep python” or Task Manager
22
Some warnings
• RPi does not keep time on poweroff
• No onboard battery and Real-Time-Clock (RTC) chip
• It can sync time when connected to network
• Do not connect current-heavy USB devices
• 600mA for all USB ports default. Can increase to 1.2A
• In: /boot/config.txt
Add: max_usb_current=1
• 2.5A resettable polyfuse
• Use powered USB-hub if needed
23
My internet radio streamer project
24
https://github.com/yeokm1/pi-radio
Q&A
25

More Related Content

What's hot

Rainbow technology-ppt
Rainbow technology-pptRainbow technology-ppt
Rainbow technology-ppt
Rajesh Roky
 

What's hot (20)

Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014Raspberry Pi Session - 22_11_2014
Raspberry Pi Session - 22_11_2014
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
Raspberry pi
Raspberry pi Raspberry pi
Raspberry pi
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
What are graphics cards
What are graphics cardsWhat are graphics cards
What are graphics cards
 
Rasp berry Pi
Rasp berry PiRasp berry Pi
Rasp berry Pi
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
Raspberry Pi presentation for Computer Architecture class
Raspberry Pi presentation for Computer Architecture classRaspberry Pi presentation for Computer Architecture class
Raspberry Pi presentation for Computer Architecture class
 
Raspberry-Pi
Raspberry-PiRaspberry-Pi
Raspberry-Pi
 
Raspberry pi : an introduction
Raspberry pi : an introductionRaspberry pi : an introduction
Raspberry pi : an introduction
 
Introduction to Arduino & Raspberry Pi
Introduction to Arduino & Raspberry PiIntroduction to Arduino & Raspberry Pi
Introduction to Arduino & Raspberry Pi
 
Raspberry pi
Raspberry pi Raspberry pi
Raspberry pi
 
Introduction to Raspberrypi
Introduction to  RaspberrypiIntroduction to  Raspberrypi
Introduction to Raspberrypi
 
Raspberry Pi Technology
Raspberry Pi TechnologyRaspberry Pi Technology
Raspberry Pi Technology
 
Raspberrypi best ppt
Raspberrypi best ppt Raspberrypi best ppt
Raspberrypi best ppt
 
Graphics card ppt
Graphics card pptGraphics card ppt
Graphics card ppt
 
Rainbow technology-ppt
Rainbow technology-pptRainbow technology-ppt
Rainbow technology-ppt
 
Aula 07 instalação de hardware
Aula 07 instalação de hardwareAula 07 instalação de hardware
Aula 07 instalação de hardware
 
Raspberry pi
Raspberry pi Raspberry pi
Raspberry pi
 
Input output ports and connectors
Input output ports and connectorsInput output ports and connectors
Input output ports and connectors
 

Viewers also liked

Viewers also liked (6)

Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
Home automation using raspberry pi
Home automation using raspberry piHome automation using raspberry pi
Home automation using raspberry pi
 
Seminar Presentation on raspberry pi
Seminar Presentation on raspberry piSeminar Presentation on raspberry pi
Seminar Presentation on raspberry pi
 
Home automation & security system
Home automation & security systemHome automation & security system
Home automation & security system
 
A seminar report on Raspberry Pi
A seminar report on Raspberry PiA seminar report on Raspberry Pi
A seminar report on Raspberry Pi
 
Presentation Smart Home With Home Automation
Presentation Smart Home With Home AutomationPresentation Smart Home With Home Automation
Presentation Smart Home With Home Automation
 

Similar to Getting Started with Raspberry Pi

Similar to Getting Started with Raspberry Pi (20)

Unit 6 - PART2.pptx
Unit 6 - PART2.pptxUnit 6 - PART2.pptx
Unit 6 - PART2.pptx
 
Up and running with Raspberry Pi
Up and running with Raspberry PiUp and running with Raspberry Pi
Up and running with Raspberry Pi
 
Introduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin ControlIntroduction To Raspberry Pi with Simple GPIO pin Control
Introduction To Raspberry Pi with Simple GPIO pin Control
 
Raspberry pi
Raspberry piRaspberry pi
Raspberry pi
 
Raspberry pi basics
Raspberry pi  basicsRaspberry pi  basics
Raspberry pi basics
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
My presentation raspberry pi
My presentation raspberry piMy presentation raspberry pi
My presentation raspberry pi
 
Introduction to raspberry pi
Introduction to raspberry piIntroduction to raspberry pi
Introduction to raspberry pi
 
Raspberry pi ppt
Raspberry pi pptRaspberry pi ppt
Raspberry pi ppt
 
Introduction to Raspberry Pi
Introduction to Raspberry PiIntroduction to Raspberry Pi
Introduction to Raspberry Pi
 
Intoduction to physical computing using Raspberry Pi, 18-02-2016
Intoduction to physical computing using Raspberry Pi, 18-02-2016Intoduction to physical computing using Raspberry Pi, 18-02-2016
Intoduction to physical computing using Raspberry Pi, 18-02-2016
 
Raspberry Pi Technology
Raspberry Pi Technology Raspberry Pi Technology
Raspberry Pi Technology
 
2_RaspberryPi presentation.pptx
2_RaspberryPi presentation.pptx2_RaspberryPi presentation.pptx
2_RaspberryPi presentation.pptx
 
Exploring the ABC's of Raspberry Pi with Python
Exploring the ABC's of Raspberry Pi with PythonExploring the ABC's of Raspberry Pi with Python
Exploring the ABC's of Raspberry Pi with Python
 
IoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptxIoT for data science Module 5 - Raspberry Pi.pptx
IoT for data science Module 5 - Raspberry Pi.pptx
 
Exploring the abc's of raspberry pi and python(day 2)
Exploring the abc's of raspberry pi and python(day 2)Exploring the abc's of raspberry pi and python(day 2)
Exploring the abc's of raspberry pi and python(day 2)
 
Raspberry PI
Raspberry PIRaspberry PI
Raspberry PI
 
Tac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PITac Presentation October 72014- Raspberry PI
Tac Presentation October 72014- Raspberry PI
 
Raspberry Pi ppt.pptx
Raspberry Pi ppt.pptxRaspberry Pi ppt.pptx
Raspberry Pi ppt.pptx
 
Raspberry Pi ppt.pptx
Raspberry Pi ppt.pptxRaspberry Pi ppt.pptx
Raspberry Pi ppt.pptx
 

More from yeokm1

More from yeokm1 (20)

I became a Private Pilot and this is my story
I became a Private Pilot and this is my storyI became a Private Pilot and this is my story
I became a Private Pilot and this is my story
 
What's inside a Cessna 172 and flying a light plane
What's inside a Cessna 172 and flying a light planeWhat's inside a Cessna 172 and flying a light plane
What's inside a Cessna 172 and flying a light plane
 
Speaking at Tech meetups/conferences for Junior Devs
Speaking at Tech meetups/conferences for Junior DevsSpeaking at Tech meetups/conferences for Junior Devs
Speaking at Tech meetups/conferences for Junior Devs
 
Reflections on Trusting Trust for Go
Reflections on Trusting Trust for GoReflections on Trusting Trust for Go
Reflections on Trusting Trust for Go
 
Meltdown and Spectre
Meltdown and SpectreMeltdown and Spectre
Meltdown and Spectre
 
Gentoo on a 486
Gentoo on a 486Gentoo on a 486
Gentoo on a 486
 
BLE Localiser (Full) for iOS Dev Scout
BLE Localiser (Full) for iOS Dev ScoutBLE Localiser (Full) for iOS Dev Scout
BLE Localiser (Full) for iOS Dev Scout
 
BLE Localiser for iOS Conf SG 2017
BLE Localiser for iOS Conf SG 2017BLE Localiser for iOS Conf SG 2017
BLE Localiser for iOS Conf SG 2017
 
Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter
 Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter
Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter
 
PCB Business Card (Singapore Power)
PCB Business Card (Singapore Power)PCB Business Card (Singapore Power)
PCB Business Card (Singapore Power)
 
SP Auto Door Unlocker
SP Auto Door UnlockerSP Auto Door Unlocker
SP Auto Door Unlocker
 
SP IoT Doorbell
SP IoT DoorbellSP IoT Doorbell
SP IoT Doorbell
 
Distance Machine Locker
Distance Machine LockerDistance Machine Locker
Distance Machine Locker
 
A Science Project: Building a sound card based on the Covox Speech Thing
A Science Project: Building a sound card based on the Covox Speech ThingA Science Project: Building a sound card based on the Covox Speech Thing
A Science Project: Building a sound card based on the Covox Speech Thing
 
A Science Project: Swift Serial Chat
A Science Project: Swift Serial ChatA Science Project: Swift Serial Chat
A Science Project: Swift Serial Chat
 
The slide rule
The slide ruleThe slide rule
The slide rule
 
Windows 3.1 (WFW) on vintage and modern hardware
Windows 3.1 (WFW) on vintage and modern hardwareWindows 3.1 (WFW) on vintage and modern hardware
Windows 3.1 (WFW) on vintage and modern hardware
 
Repair Kopitiam Circuit Breaker Training
Repair Kopitiam Circuit Breaker TrainingRepair Kopitiam Circuit Breaker Training
Repair Kopitiam Circuit Breaker Training
 
A2: Analog Malicious Hardware
A2: Analog Malicious HardwareA2: Analog Malicious Hardware
A2: Analog Malicious Hardware
 
My Life as a Maker
My Life as a MakerMy Life as a Maker
My Life as a Maker
 

Recently uploaded

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Getting Started with Raspberry Pi

  • 1. Getting Started with Raspberry Pi (RPi) By: Yeo Kheng Meng (yeokm1@gmail.com) https://github.com/yeokm1/getting-started-with-rpi Creative Crew (12 Aug 2016) 1
  • 2. About me • Hardware Engineer at Algo Access • My Hardware projects with Arduino and Raspberry Pi 2
  • 3. Who is this talk for? • Beginners to the world of hardware • People with Arduino experience 3
  • 4. What is a Raspberry Pi (RPi)? • The Raspberry Pi is a series of credit card-sized single- board computers developed in the United Kingdom by the Raspberry Pi Foundationto promote the teaching of basic computer science in schools and developing countries • https://en.wikipedia.org/wiki/Raspberry_Pi 4
  • 5. Types of Raspberry Pi Model B+ (2014) 2 Model B (2015) Model A+ (2014) 700Mhz single-core ARMv6 256MB Ram 1 USB port No Ethernet port 700Mhz single-core ARMv6 512MB RAM 4 USB ports Ethernet port 900Mhz quad-core ARMv7 1024MB Ram 4 USB ports Ethernet port 5 3 Model B (2016) 1.2Ghz quad-core ARMv8 1024MB RAM 4 USB ports Ethernet port, Wifi, Bluetooth Zero (2015) 1Ghz single-core ARMv6 512MB RAM 1 USB OTG port Micro-HDMI Compute Module (2014) 700Mhz single-core ARMv6 512MB RAM 4GB onboard flash SODIMM connector Model B (2012) 700Mhz single-core ARMv6 256MB RAM 2 USB ports Ethernet port Obsolete (Do not purchase unless you have special reasons) Special Mention
  • 6. Arduino vs Raspberry Pi Specs Arduino Uno Raspberry Pi 3 Model B CPU type Microcontroller Microprocessor Operating System None Linux (usually Raspbian) or Win 10 Speed 16 Mhz 1.2Ghz RAM 2KB 1GB GPU/Display None VideoCore IV GPU Disk 32KB Depends on SD card GPIO pins 14 digital pins (includes 6 analog) 26 digital pins Other connectivity None USB, Ethernet, HDMI, audio Power consumption 0.25W 6W 6
  • 7. Minimum to get started • Raspberry Pi 3 • HDMI monitor • USB Keyboard • USB Mouse • 2.5 Amp USB Power Adapter • Micro-USB cable • 8GB Micro-SD card • Computer to load initial card image 7
  • 8. Step 1: Download SD card image • Download *.img files from • https://www.raspberrypi.org/downloads/ • https://www.raspberrypi.org/downloads/raspbian/ • Beginners should pick Raspbian Jessie 8
  • 9. Step 2: Write image to SD card • Windows computer • https://sourceforge.net/projects/win32diskimager/ • Mac and Linux computer • Get drive number of SD card • sudo fdisk –l • Write disk image to drive number N • sudo dd if=path_of_your_image.img of=/dev/rdiskN bs=1m 9
  • 10. Step 3: Boot Raspberry Pi from SD card • Might take a few minutes for the first time 10
  • 11. Step 4: Initial Configuration • Set locale to Singapore • Set keyboard layout to English (US) • Configure locale and time zone 11
  • 12. Step 5: Do a system update • Connect to the Internet • Open the terminal • Look for new system updates • sudo apt-get update • Download and install latest updates • sudo apt-get upgrade • Recommend to reboot after that 12
  • 13. Available Applications • Web Browser: Epiphany • Office Applications: Libreoffice • Media Player: VLC • Run: sudo apt-get install vlc 13
  • 14. Raspbian default username/password • Username: pi • Password: raspberry 14
  • 15. File System Directory layout • /home/pi or “~” • Your “Home” directory • Removable Drives at • /media/pi/…. 15
  • 16. Header pins • 26 Digital-only General Purpose Input Output pins • 3.3V logic levels • Arduino uses 5V 16
  • 17. Using the GPIO pins • Python programming language • LED • Button 17
  • 18. LED and Button Connection 18 Parts • Breadboard • Button • 1x 10K ohm pull-down resistor • Button • 1x 220 ohm resistor
  • 19. LED Blinky • Blink LED at 1 second intervals using Python • python led.py 19
  • 20. LED and button code 1 • Button press supposed to toggle LED status • python button1.py 20
  • 21. LED and button code 2 (Debouncing) • Button press now toggles LED correctly • python button2.py • Observe CPU usage: “ps aux | grep python” or Task Manager 21
  • 22. LED and button code 3 • Toggle LED without sucking CPU resources by sleeping a little in the loop • python button3.py • Observe CPU usage: “ps aux | grep python” or Task Manager 22
  • 23. Some warnings • RPi does not keep time on poweroff • No onboard battery and Real-Time-Clock (RTC) chip • It can sync time when connected to network • Do not connect current-heavy USB devices • 600mA for all USB ports default. Can increase to 1.2A • In: /boot/config.txt Add: max_usb_current=1 • 2.5A resettable polyfuse • Use powered USB-hub if needed 23
  • 24. My internet radio streamer project 24 https://github.com/yeokm1/pi-radio