Embedded Development Workshop
Please sign in:
Meme Roundup:
Overview:
BOM:
Important:
IDE Setup
Download the Arduino IDE from https://www.arduino.cc/en/software
Wiring Things Up
Breadboard Basics
The pins in each ROW are connected
The pins in the outer COLUMNS are connected
We can use these connections to build a circuit!
Helpful: Breadboard teardown
Breadboard Basics
Placing something in the middle connects it to both sets of rows
Placing something on one side connects it to a single set of rows
We use jumper wires to connect components
Wiring Diagram
Start with your breadboard laid horizontally in front of you
Wiring Diagram
The Pi goes all the way to the left, with the USB connector facing left�(we did this part for you)
Wiring Diagram
Put the display in the bottom-right corner
Wiring Diagram
The encoder goes here – the rightmost pins of the encoder should be 4 rows in from the edge, so they don’t overlap with the pins of the display
You’ll need to bend the wide legs on either side of the encoder up as pictured to make it fit in the breadboard
(two-pin side facing “up”)
Wiring Diagram
Wiring Diagram
Wiring Diagram
Wiring Diagram
IDE Configuration
IDE Setup
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
IDE Setup
IDE Setup
Get sample code
Configure LVGL
Microcontrollers
Microcontrollers
Uploading Code
Task 1: Upload Code
I2C Communication
The I2C Protocol
Our display – the SSD1306
Task 2: Write Display Data
Task 2: Solution
Wire.beginTransmission(I2C_ADDR);
Wire.write(0x40);
Wire.write(data_byte);
Wire.endTransmission();
Task 2: Upload code
Graphics with LVGL
LVGL
Task 3: LVGL Labels and Buttons
Interrupts
Rotary Encoders
Rotary Encoder Signals
Rotary Encoder Signals: Interrupts
Task 4: Encoder ISR
Task 4: Encoder ISR
if (data) {
++encoder_ticks;
} else {
--encoder_ticks;
}
Thanks for coming!
Next week: Bare Metal Embedded Development on STM32
Before leaving, please return your kit to the front of the room! They will be reused in future workshops. No need to disassemble anything before returning.