Upload
others
View
30
Download
0
Embed Size (px)
Citation preview
Lab 1 – Warm-up with Raspberry Pi
ECE 1175 Embedded System Design
ECE 1175 – Lab 1
Raspberry Pi Basics Hardware & software How to start
Lab 1 Task – warm-up with Pi A brief introduction
If you missed the pick-up time on Monday (8/24), please contact TA (Kai Huang: [email protected]) to schedule another time slot for pick-up.
ECE 1175 – Lab 1
Take care of your boards Avoid touching the circuits on the boards Keep boards dry and clean Make good use of the clear case
Raspberry Pi
Classic “embedded” computer Single board computer Size of a credit card
ECE 1160/2160 Embedded Systems Design 4
Raspberry Pi
Raspberry Pi
Microprocessor (Raspberry Pi 3B)• Broadcom [email protected] GHz• 64-bit quad-core ARM Cortex-A53
• Same as … Dual-core VideoCore 4 multimedia
co-processor• “Small GPU”
1 GB DDR2 Memory
Connectivity 802.11 b/g/n WiFi + Bluetooth 4.1
ECE 1160/2160 Embedded Systems Design 5
LG V10 Sony Xperia X
Raspberry Pi
Input/Output OS: Raspbian
Raspberry Pi
Power Supply Use either power adapter or USB charger Provided power adapter is recommended If want to use your own USB charger
• Micro USB• Make sure 5V@2A(or > 2A)• Be aware of undervoltage issues!
ECE 1160/2160 Embedded Systems Design 7
Raspberry Pi
ECE 1160/2160 Embedded Systems Design 8
HDMI Port HDMI port enables you to send audio/video
data from Raspberry Pi to your monitor so thatyou can see what is happening inside your little computer.
Raspberry Pi
USB 2.0 Port X 4
4 USB ports could be used as connector for your keyboard and mouse when you are operating in Raspberry Pi.
ECE 1160/2160 Embedded Systems Design 9
Raspberry Pi
Ethernet Cable Port
Use Ethernet cable to connect Raspberry Pi to the Internet. Or you can use the built-in WiFi for connection.
ECE 1160/2160 Embedded Systems Design 10
Raspberry Pi
General Purpose Input/Output (GPIO): It is a generic pin on Raspberry Pi board
and controlled by user at run time for input or output purpose. Raspberry Pi has 40 pins on board.
ECE 1160/2160 Embedded Systems Design 11
Operating System
ECE 1160/2160 Embedded Systems Design 12
Operating system (OS) It is a program Manage computer software and hardware resources Provide service to users
Operating System – Linux
Linux One type of Operating system (Traditionally) using command line to provide service to users
ECE 1160/2160 Embedded Systems Design 13
Linux Kernel Terminal
Shell
Operating System – Linux
Terminal Text/command line input/output environment
Shell A software interpreting command line
Linux Kernel Access to hardware resource
Hardware Process data and managed by Linux kernel
ECE 1160/2160 Embedded Systems Design 14
Terminal
Shell
Kernel
User
Hardware
Operating System – Linux
ECE 1160/2160 Embedded Systems Design 15
Compile Instruction:1. gcc world.c -o world2. ./world
Operating System – Raspbian Raspbian A free operating system based on Linux kernel Optimized for the Raspberry Pi hardware 35,000+ packages
• communication package• sound package• graphics package• Complete list: http://www.raspberryconnect.com/raspbian-packages-list• *install package by command: apt/apt-get install <package name>
Pre-installed software • Python, GCC, …• Mathematica, Scratch• other programming software.
ECE 1160/2160 Embedded Systems Design 16
Debian
Operating System – Raspbian
Scratch Scratch is a programming language with blocks, not code,
for interactive stories, games and animations
ECE 1160/2160 Embedded Systems Design 17
Operating System – Raspbian Mathematica mathematical symbolic computation program or computer algebra program
ECE 1160/2160 Embedded Systems Design 18
Expand mathematical expression
Output 200 digits of Pi
Operating System – Raspbian Programming software Python 2 -> Python 3
ECE 1160/2160 Embedded Systems Design 19
Operating System – Raspbian Programming software BlueJ: Java
ECE 1160/2160 Embedded Systems Design 20
Operating System – Other choices
Risc OS Unix-like OS Incompatible with Linux software
OpenELEC/RaspBMC Entertainment system Design for media play center
Arch Linux/Ubuntu Mate Linux experience required Not for beginner
Window 10 IoT Desktop and desktop is not included
ECE 1160/2160 Embedded Systems Design 21
Raspberry Pi for Labs
1. Clear case 2. Power adapter 3. Sense HAT 4. Micro-SD card and its adapter 5. Raspberry Pi Board 6. HDMI/VGA Cable
Raspberry Pi for Labs
Micro SD Card Store operating system and user data Typically 8 GB is enough for lab tasks Pre-installed with NOOBS
NOOBS is an easy operating system installer which includes Raspbian. It also provides a selection of alternative operating systems.
Raspberry Pi for Labs
Some things to mention The SD card on your hand might not be a brand new one (It’s OK)
• It has been processed by previous students.• The operating system is already installed.
If you want to format your SD card and reinstall your operating system • You will need the adapter.• There are plenty of tutorials online and it will be a good practice.• E.g., https://youtu.be/fe9A6AYXIx0
Raspberry Pi Board Two USB ports, one for mouse and the other for keyboard Power supply slot HDMI port Micro SD card slot
Raspberry Pi Board
Attention Please always insert SD card first. Raspberry Pi will start to boot up once the power supply is on. When you shut down the system, do not remove the power supply
until the status LED on the board stops blinking.
Status LED
Raspbian
Switch your monitor’s input source to VGA
Raspbian
Installation and boot-up runtime screenshot and keep waiting
Raspbian
Installation and boot-up runtime screenshot and keep waiting
Raspbian
Installation and boot-up runtime screenshot and keep waiting
Raspbian
Only appear if you choose NOOBS, and select raspbian for boot-up
Raspbian
Installation and boot-up runtime screenshot and keep waiting
Raspbian
Installation and boot-up runtime screenshot and keep waiting
Raspbian
Raspbian Desktop
Raspbian
WiFi Connection The lab (1223 Benedum) WiFi (802.11g)
• Name: Embedded System Class• Password: embedded1234
WiFi standard supported by Raspberry Pi 3• 802.11b/g/n (2.4 GHz) supported• 802.11ac (5 GHz) NOT supported• Please check the standard when choosing other WiFi connections
Terminal
Terminal
Lab 1 Task
Warm-up with Raspberry Pi Get familiar with some basic commands of Linux. Use pre-installed packages to modify the configurations and
behaviors of the system. Please refer to lab1.htm posted on the course website for details.
If your equipment is malfunctioning or you have any confusion about the lab assignments, please contact TA (Kai Huang: [email protected]) for help.