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 cannot pick-up the Pi on Friday (9/17), please contact TA (Xiangyu (Eric) Yin: [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 protective case
Raspberry Pi
Classic “embedded” computer
Single board computer
Size of a credit card
Raspberry Pi
Raspberry Pi
Microprocessor (Raspberry Pi 4B)
• Broadcom BCM2711 (ARM v8) 64-bit SoC @ 1.5GHz
• 64-bit quad-core ARM Cortex-A53
• Same as …
Hardware video codec
• H.265 H.264
4 GB DDR4 Memory
Connectivity
2.4G & 5GHz WiFi + Bluetooth 5.0
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
• USB-Type C
• Make sure 5V@3A(or > 3A)
• Be aware of undervoltage issues!
7
Raspberry Pi
HDMI Port
Micro-HDMI ports *2 (HDMI0 & HDMI1)
Make sure you connect your main monitor to HDMI0
HDMI port enables you to send audio/video data from Raspberry Pi to your monitor so that you can see what is happening inside your little computer.
USB 2.0 Port *2 + USE 3.0 Port *2
4 USB ports could be used as connectors for your keyboard and mouse when you are operating in Raspberry Pi.
Raspberry Pi
9
USB 3.0 USB 2.0
Ethernet Cable Port
Use Ethernet cable to connect Raspberry Pi to the Internet. Or you can use the built-in WiFi for connection.
Raspberry Pi
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.
11
Operating System
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
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
Terminal Shell Kernel
User
Hardware
Operating System – Linux
ECE 1160/2160 Embedded Systems Design 15
Compile Instruction:
1. gcc world.c -o world 2. ./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.
Debian
Operating System – Raspbian
Scratch
Scratch is a programming language with blocks, not code, for interactive stories, games and animations
17
Operating System – Raspbian
Mathematica
mathematical symbolic computation program or computer algebra program
Expand mathematical expression
Output 200 digits of Pi
Operating System – Raspbian
Programming software
Python 2 -> Python 3
19
Operating System – Raspbian
Programming software
BlueJ: Java
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
21
Raspberry Pi for Labs
1. Protective case
2. Power adapter
3. Sense HAT
4. Micro-SD card and its adapter
5. Raspberry Pi board
6. Micro-HDMI/VGA adapter
7. Micro-HDMI/HDMI cable
8. Cooling fan
9. Heat sinks
10. Quick-start Manual
All devices need to be returned at the end of this course
Please take care of your Pi kit
Get Started
Assemble the Pi (refer to the manual)
1. Take out the case and Pi board
Get Started
Assemble the Pi (refer to the manual)
2. Put Raspberry Pi into the case
Get Started
Assemble the Pi (refer to the manual)
3. (Optional) Put on the heat sinks and cooling fan Red wire on right 2nd pin Black wire on right 3rd pin
Get Started
Assemble the Pi (refer to the manual)
4. Insert the SD card
Micro SD Card
Store your OS and data
32GB 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.
Get Started
Assemble the Pi (refer to the manual)
5. Wire the cables
Power adapter
Micro-HDMI/VGA adapter
Mouse and keyboard
VGA cable To monitor ->
Unplug the mouse and keyboard from the lab PC.
Remember to return it to original place after lab session.
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 green status LED on the board stops blinking.
Status LED
Raspbian
Switch your monitor’s input source to VGA
Raspbian
Raspbian
Installation and boot-up runtime screenshot and keep waiting
Raspbian
Raspbian
Installation and boot-up runtime screenshot and keep waiting
Raspbian
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 4
• 802.11b/g/n (2.4 GHz) supported
• 802.11ac (5 GHz) supported
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 (Xiangyu (Eric) Yin: [email protected]) for help.
Attention
Take turns to use the monitor, mouse and keyboard.
Remember to restore the mouse and keyboard connection with the lab PC before you leave.
Make sure the lab PC is showing the Windows lock screen as usual after you finish.