Single Board Computers & Raspberry Pi Basics
-
Upload
eueung-mulyana -
Category
Technology
-
view
734 -
download
2
Transcript of Single Board Computers & Raspberry Pi Basics
![Page 1: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/1.jpg)
LTKA Labs
SBCs & Raspberry Pi BasicsEueung Mulyana
http://eueung.github.io/ET3010/raspiET-3010 | Attribution-ShareAlike CC BY-SA
1 / 59
![Page 2: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/2.jpg)
Outline
Single Board Computers
Raspberry Pi - Short Introduction
RPi Pinout
Raspbian - Getting Started
Node-RED & Python
2 / 59
![Page 3: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/3.jpg)
SBCs
Single Board Computers
3 / 59
![Page 4: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/4.jpg)
A Single-Board Computer (SBC) is a computer built on a singlecircuit board, with microprocessor(s), memory, input/output(I/O) and other features required of a functional computer.SBCs typically provide a fanless, low-power computing solution.Current SBCs come with a wide variety of processor types, mostwith GPUs on-board. These processors range from X86 basedprocessors from the traditional PC space (AMD and Intel) toARM processors which have traditionally been used in theindustrial and more recently mobile spaces. The most prevalentform of software used on SBCs is Linux with numerousderivations including Android, Ubuntu, Fedora, Debian and ArchLinux as well as FreeBSD.
Many of today's SBCs have become so powerful that they arebeginning to have the capability of modern day PCs and tablets.This trend will continue as more powerful processors make theirway into the embedded computing market as ever-increasingperformance/price ratios rise, as well as additionalmanufacturers enter into this "Wild West" frontier of supportingopen source hardware and software for both DIYers andprofessionals alike.
SBCsIn 2006, a group based in the University of Cambridge'sComputer Laboratory, decided to address the need for a lowcost computing platform that would allow kids to learn how toprogram without the need for a full-¯edged home computer.
The result was a $35 single board computer named RaspberryPi. While initially designed as a tool for students to learnprogramming, the Raspberry Pi was adopted by makers,designers, students and even professional engineers andhelped to launch the current boom in interest in SBCs.
Ref: Electronic Design, Then and Now A Brief History of SingleBoard Computers
4 / 59
![Page 5: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/5.jpg)
5 / 59
Nine Sub-$50 SBCsthat Challenge theRaspberry Pi and
BeagleBone Black
86Duino, A10-OLinuXino-Lime,Arduino TRE, Banana Pi, BPi D1,HummingBoard-i1, Odroid-C1,Orange Pi, and pcDuino3 Nano
Ref: hackerboards.com
![Page 6: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/6.jpg)
6 / 59
Top 10 Sub-$100Hacker SBC List for
2015 (in Order ofImportance)
Ref: hackerboards.com
![Page 7: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/7.jpg)
64-bit SBCs: DragonBoard 410c & Pine A64
7 / 59
![Page 8: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/8.jpg)
Raspberry Pi / RPi / RasPi
Short Introduction
8 / 59
![Page 9: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/9.jpg)
What is a Raspberry Pi?
The Raspberry Pi is a low cost, credit-card sized computer that plugs into acomputer monitor or TV, and uses a standard keyboard and mouse. It is a capablelittle device that enables people of all ages to explore computing, and to learn howto program in languages like Scratch and Python. It's capable of doing everythingyou'd expect a desktop computer to do, from browsing the internet and playing
high-de nition video, to making spreadsheets, word-processing, and playinggames.
What's more, the Raspberry Pi has the ability to interact with the outside world, and has been used in a wide arrayof digital maker projects, from music machines and parent detectors to weather stations and tweeting birdhouses
with infra-red cameras.
9 / 59
![Page 10: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/10.jpg)
10 / 59
Credit card sized single boardcomputer
Teach computer science in
schools at an a!ordable price:Grade School, Middle School &
High School
Design and Development startedin 2006
Raspberry PI Foundation
founded in 2009
Release to Market Feb 2012
3 Million sold by June 2014 5 Million by 03/2015
![Page 11: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/11.jpg)
11 / 59
Early Models A, BRaspberry PI Model A $25 - 256 MBRAM, 1 USB, No Ethernet, GPIO 26
Raspberry PI Model B $35 - 512 MBRAM, 2 USB, Ethernet , GPIO 26
Raspberry PI Model B+ $35 - 512MB RAM, 4 USB, Ethernet, GPIO 40
All have HDMI Out with Audio
All have Audio Jack out
![Page 12: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/12.jpg)
12 / 59
![Page 13: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/13.jpg)
Model A/B:Broadcom BCM2835 (CPU & GPU)256/512MB SDRAM1/2 USB 2.0 PortsNone/Ethernet PortHDMIAudioSD Card SlotMicro USB for power
13 / 59
![Page 14: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/14.jpg)
14 / 59
RPi Model B
Power
![Page 15: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/15.jpg)
15 / 59
RPi Model B
Audio &Video
![Page 16: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/16.jpg)
16 / 59
RPi Model B
Connectivity
![Page 17: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/17.jpg)
17 / 59
RPi Model B
Internals
![Page 18: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/18.jpg)
18 / 59
RPi Model B
Storage
![Page 19: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/19.jpg)
19 / 59
RPi Model B
Parts
![Page 20: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/20.jpg)
20 / 59
CPU Overview
BCM2835ARM11J6JZF-S (ARM11 Family)ARMv6 ArchitectureSingle Core32-Bit RISC700 MHz Clock Rate8 Pipeline StagesBranch Prediction
![Page 21: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/21.jpg)
21 / 59
![Page 22: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/22.jpg)
22 / 59
RPi 2BBCM 2836ARMv7 ArchitectureQuad Core32-Bit RISC900 MHz Clock Rate1 GB RAM
![Page 23: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/23.jpg)
23 / 59
![Page 24: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/24.jpg)
24 / 59
![Page 25: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/25.jpg)
25 / 59
![Page 26: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/26.jpg)
26 / 59
RPi 3BBCM 2837ARMv8 ArchitectureQuad Core64-Bit1.2 GHz Clock Rate1 GB RAM
![Page 27: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/27.jpg)
27 / 59
![Page 28: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/28.jpg)
28 / 59
![Page 29: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/29.jpg)
29 / 59
![Page 30: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/30.jpg)
30 / 59
![Page 31: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/31.jpg)
31 / 59
![Page 32: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/32.jpg)
RPi Pinout
32 / 59
![Page 33: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/33.jpg)
33 / 59
![Page 34: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/34.jpg)
34 / 59
![Page 35: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/35.jpg)
35 / 59
![Page 37: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/37.jpg)
The Raspberry Pi is a 3.3V deviceThe GPIO pins are unbu!ered andunprotected, so if you short somethingout, you could fry your whole Pi, so becareful!
37 / 59
Notes
On Raspberry Pi, all GPIO banks are supplied from 3.3V.Connection of a GPIO to a voltage higher than 3.3V will likely
destroy the GPIO block within the SoC.
![Page 38: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/38.jpg)
38 / 59
Physical Computing
RPi vs. Arduino
Arduino boards are micro-controllers, not full computers.They don't run a full operating system, but simply execute
written code as their rmware interprets it.
You lose access to the basic tools an operating systemprovides, but on the other hand, directly executing simple
code is easier, and is accomplished with no operating systemoverhead.
The main purpose of the Arduino board is to interface withsensors and devices, so it's great for hardware projects in
which you simply want things to respond to various sensorreadings and manual input.
Ref: Digital Trends via Kopcak
![Page 39: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/39.jpg)
Raspbian
Getting Started
39 / 59
![Page 41: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/41.jpg)
41 / 59
Raspbian JessieRelease 2016-03-18
Full Desktop vs. Lite
![Page 42: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/42.jpg)
1. Plug the SD Card loaded with the Operating System intothe Raspberry Pi.
2. If required, plug the USB keyboard and mouse into theRaspberry Pi, perhaps via a USB Hub. Connect the Hub topower, if necessary.
3. If required, plug the video cable into the display and intothe Raspberry Pi.
4. Plug in your Network cable, or Wi-Fi dongle, if required.5. Ensure that your USB Hub (if any) and display are
working.6. With your screen on, plug the other end of the power
source into the Raspberry Pi.7. Plug the power source into the main socket, and switch it
on.8. If connected to a display, the Raspberry Pi should boot up
and display messages on the screen.9. If running headless, it should boot up. When the leds
have stopped ¯ashing, connect to the Raspberry Pi fromthe remote computer. Whether this works will depend onthe operating system you are using; the Raspian Linuxoperating system is con gured to allow SSH connectionsby default.
42 / 59
General StepsIt is always recommended to connect the MicroUSB Power to
the unit last (while most connections can be made live, it isbest practice to connect items such as displays and other
connections with the power turned o!).
Ref: Basic Setup
![Page 44: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/44.jpg)
44 / 59
![Page 45: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/45.jpg)
45 / 59
SSH via PuTTY
![Page 46: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/46.jpg)
46 / 59
SSH Console
raspi-config
![Page 47: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/47.jpg)
Remote SSH Session
# credential: pi/raspberry$ sudo raspi-config
# after reboot$ df -h
$ uname -a$ lsb_release -a
TightVNC Server
$ sudo apt-get install tightvncserver
$ tightvncserver # access password, min 6 chars
$ vncserver :1 -geometry 800x600 -depth 24$ sudo service lightdm stop
47 / 59
Some CLIs
![Page 48: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/48.jpg)
48 / 59
VNC Client
![Page 49: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/49.jpg)
49 / 59
![Page 50: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/50.jpg)
Node-RED & Python
50 / 59
![Page 51: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/51.jpg)
Node-RED is a tool for wiring together hardware devices,APIs and online services in new and interesting ways.
Node-RED provides a browser-based ¯ow editor that makesit easy to wire together ¯ows using the wide range nodes inthe palette. Flows can be then deployed to the runtime in a
single-click.
JavaScript functions can be created within the editor using arich text editor.
A built-in library allows you to save useful functions,templates or ¯ows for re-use.
Ref: Node-RED
51 / 59
Node-REDA visual tool for wiring the Internet of Things
![Page 52: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/52.jpg)
52 / 59
![Page 53: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/53.jpg)
53 / 59
![Page 54: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/54.jpg)
54 / 59
![Page 55: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/55.jpg)
55 / 59
![Page 56: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/56.jpg)
56 / 59
Pythonvia IDLE
import RPi.GPIO as GPIOimport time
GPIO.setmode(GPIO.BCM)GPIO.setwarnings(False)
led = 4GPIO.setup(led,GPIO.OUT)
def blink(pin): GPIO.output(pin,1) time.sleep(1) GPIO.output(pin,0) time.sleep(1)
for i in range (0,10): blink(led)
GPIO.cleanup()
![Page 57: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/57.jpg)
Refs
57 / 59
![Page 58: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/58.jpg)
Refs1. Top ten sub-$100 hacker SBCs for your holiday pleasure2. Ringing in 2015 with 40 Linux-friendly hacker SBCs3. Cli! Ortmeyer, Then and Now A Brief History of Single Board Computers,
Electronic Design, Issue 6, December 20144. RPi Low-level peripherals - eLinux.org5. Introducing the Raspberry Pi 3 | Hackaday6. Adafruit Learning System7. Je!rey Kopcak, An Introduction to the Credit-Card Sized Computer8. The MagPi Magazine - The oþcial Raspberry Pi magazineThe MagPi Magazine9. Mike Linnen, What can I do with a Raspberry Pi
10. Jon Holton and Tim Fratangelo, Raspberry Pi Architecture
58 / 59
![Page 59: Single Board Computers & Raspberry Pi Basics](https://reader034.fdocuments.in/reader034/viewer/2022042723/589f12071a28ab226b8b6573/html5/thumbnails/59.jpg)
ENDEueung Mulyana
http://eueung.github.io/ET3010/raspiLTKA Labs | Attribution-ShareAlike CC BY-SA
59 / 59