Lab 1 – Warm-up with Raspberry Pi

41
Lab 1 – Warm-up with Raspberry Pi ECE 1175 Embedded System Design

Transcript of Lab 1 – Warm-up with Raspberry Pi

Page 1: Lab 1 – Warm-up with Raspberry Pi

Lab 1 – Warm-up with Raspberry Pi

ECE 1175 Embedded System Design

Page 2: Lab 1 – Warm-up with Raspberry Pi

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.

Page 3: Lab 1 – Warm-up with Raspberry Pi

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

Page 4: Lab 1 – Warm-up with Raspberry Pi

Raspberry Pi

Classic “embedded” computer Single board computer Size of a credit card

4

Raspberry Pi

Page 5: Lab 1 – Warm-up with 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

Page 6: Lab 1 – Warm-up with Raspberry Pi

Raspberry Pi

Input/Output OS: Raspbian

Page 7: Lab 1 – Warm-up with Raspberry Pi

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

Page 8: Lab 1 – Warm-up with Raspberry Pi

Raspberry Pi

8

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 thatyou can see what is happening inside your little computer.

Page 9: Lab 1 – Warm-up with Raspberry Pi

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

Page 10: Lab 1 – Warm-up with 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.

Raspberry Pi

10

Page 11: Lab 1 – Warm-up with 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

Page 12: Lab 1 – Warm-up with Raspberry Pi

Operating System

12

Operating system (OS) It is a program Manage computer software and hardware resources Provide service to users

Page 13: Lab 1 – Warm-up with Raspberry Pi

Operating System – Linux

Linux One type of Operating system (Traditionally) using command line to provide service to users

13

Linux Kernel Terminal

Shell

Page 14: Lab 1 – Warm-up with Raspberry Pi

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

14

Terminal

Shell

Kernel

User

Hardware

Page 15: Lab 1 – Warm-up with Raspberry Pi

Operating System – Linux

ECE 1160/2160 Embedded Systems Design 15

Compile Instruction:1. gcc world.c -o world2. ./world

Page 16: Lab 1 – Warm-up with Raspberry Pi

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.

16

Debian

Page 17: Lab 1 – Warm-up with Raspberry Pi

Operating System – Raspbian

Scratch Scratch is a programming language with blocks, not code,

for interactive stories, games and animations

17

Page 18: Lab 1 – Warm-up with Raspberry Pi

Operating System – Raspbian Mathematica mathematical symbolic computation program or computer algebra program

18

Expand mathematical expression

Output 200 digits of Pi

Page 19: Lab 1 – Warm-up with Raspberry Pi

Operating System – Raspbian Programming software Python 2 -> Python 3

19

Page 20: Lab 1 – Warm-up with Raspberry Pi

Operating System – Raspbian Programming software BlueJ: Java

20

Page 21: Lab 1 – Warm-up with Raspberry Pi

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

Page 22: Lab 1 – Warm-up with Raspberry Pi

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

Page 23: Lab 1 – Warm-up with Raspberry Pi

Get Started Assemble the Pi (refer to the manual)

1. Take out the case and Pi board

Page 24: Lab 1 – Warm-up with Raspberry Pi

Get Started Assemble the Pi (refer to the manual)

2. Put Raspberry Pi into the case

Page 25: Lab 1 – Warm-up with Raspberry Pi

Get Started Assemble the Pi (refer to the manual)

3. (Optional) Put on the heat sinks and cooling fan Red wire on right 2nd pinBlack wire on right 3rd pin

Page 26: Lab 1 – Warm-up with Raspberry Pi

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.

SD card slot

Page 27: Lab 1 – Warm-up with Raspberry Pi

Get Started Assemble the Pi (refer to the manual)

5. Wire the cables

Power adapter

Micro-HDMI/VGA adapter

Mouse and keyboard

VGA cableTo monitor ->

Unplug the mouse and keyboard from the lab PC. Remember to return it to original place after lab session.

Page 28: Lab 1 – Warm-up with Raspberry Pi

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

Page 29: Lab 1 – Warm-up with Raspberry Pi

Raspbian

Switch your monitor’s input source to VGA

Page 30: Lab 1 – Warm-up with Raspberry Pi

Raspbian

Installation and boot-up runtime screenshot and keep waiting

Page 31: Lab 1 – Warm-up with Raspberry Pi

Raspbian

Installation and boot-up runtime screenshot and keep waiting

Page 32: Lab 1 – Warm-up with Raspberry Pi

Raspbian

NOOBS: select raspbian for boot-up

Page 33: Lab 1 – Warm-up with Raspberry Pi

Raspbian

Installation and boot-up runtime screenshot and keep waiting

Page 34: Lab 1 – Warm-up with Raspberry Pi

Raspbian

Installation and boot-up runtime screenshot and keep waiting

Page 35: Lab 1 – Warm-up with Raspberry Pi

Raspbian

Raspbian Desktop

Page 36: Lab 1 – Warm-up with Raspberry Pi

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

Page 37: Lab 1 – Warm-up with Raspberry Pi

Terminal

Page 38: Lab 1 – Warm-up with Raspberry Pi

Terminal

Page 39: Lab 1 – Warm-up with Raspberry Pi

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.

Page 40: Lab 1 – Warm-up with Raspberry Pi

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.

Page 41: Lab 1 – Warm-up with Raspberry Pi