# lifewithdavid/raspberrypipico-baremetaladventures architecture

> Architecture diagram of the GitHub repository lifewithdavid/raspberrypipico-baremetaladventures, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lifewithdavid/raspberrypipico-baremetaladventures
- Repository: https://github.com/lifewithdavid/raspberrypipico-baremetaladventures

## Overview

This repository is a collection of Raspberry Pi Pico bare-metal learning examples, progressing from small C programs to keyboard, OLED-display, and multicore computer demonstrations. The user-facing workflow in the later examples is to enter keys, decode them on the Pico, exchange values between cores or with a USB terminal, and display status on an SSD1306. The chapter folders preserve separate iterations rather than forming one unified application. The source excerpts support the keyboard/FIFO and display capabilities, but do not show every demo’s complete control flow.

Main entry points: [`Chapter 17`](https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/tree/main/Chapter%2017) (Chapter 17 demos), [`Chapter 18/kbDisplayIntegrated.c`](https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/blob/main/Chapter%2018/kbDisplayIntegrated.c) (Chapter 18 emulator demo), [`Chapter 19/kbDisplayIntegrated.c`](https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/blob/main/Chapter%2019/kbDisplayIntegrated.c) (Chapter 19 emulator demo), [`Chapter 18/ssd1306_font.h`](https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/blob/main/Chapter%2018/ssd1306_font.h) (Display font data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_basics["Early examples"]
  node_ch02["Chapter 2 example<br/>[main.c]"]
  node_ch03["Chapter 3 demos"]
end

subgraph group_input["Keyboard and transport"]
  node_ch16["Chapter 16 demos"]
  node_ch17["Chapter 17 demos"]
  node_fifo["Intercore FIFO"]
end

subgraph group_display["OLED display"]
  node_fonts["Display font data<br/>[ssd1306_font.h]"]
end

subgraph group_computer["Computer demos"]
  node_ch18["Chapter 18 emulator demo"]
  node_ch19["Chapter 19 emulator demo"]
  node_octal["Octal conversion<br/>[octal_conv.py]"]
end

node_learner(("Experimenter"))
node_keyboard["Matrix keyboard"]
node_usb["USB terminal"]
node_oled["SSD1306 OLED"]

node_learner -.->|"runs example"| node_ch02
node_learner -.->|"runs demos"| node_ch03
node_keyboard -->|"key input"| node_ch17
node_ch17 -->|"sends key data"| node_fifo
node_usb -.->|"terminal input"| node_ch17
node_ch17 -->|"prints results"| node_usb
node_ch17 -.->|"updates display"| node_oled
node_fonts -->|"font data"| node_ch18
node_keyboard -.->|"key input"| node_ch18
node_ch18 -.->|"exchanges values"| node_fifo
node_ch18 -.->|"updates display"| node_oled
node_fonts -->|"font data"| node_ch19
node_keyboard -.->|"key input"| node_ch19
node_ch19 -.->|"updates display"| node_oled
node_learner -.->|"runs demos"| node_ch16
node_ch16 -.->|"updates display"| node_oled
node_learner -.->|"runs demos"| node_ch17
node_learner -.->|"runs demo"| node_ch18
node_learner -.->|"runs demo"| node_ch19

click node_ch02 "https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/blob/main/Chapter%2002/main.c"
click node_ch03 "https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/tree/main/Chapter%2003"
click node_ch16 "https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/tree/main/Chapter%2016"
click node_ch17 "https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/tree/main/Chapter%2017"
click node_fonts "https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/blob/main/Chapter%2018/ssd1306_font.h"
click node_ch18 "https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/blob/main/Chapter%2018/kbDisplayIntegrated.c"
click node_ch19 "https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/blob/main/Chapter%2019/kbDisplayIntegrated.c"
click node_octal "https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/blob/main/Chapter%2019/octal_conv.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ch02,node_ch03 toneBlue
class node_ch16,node_ch17,node_fifo toneAmber
class node_fonts toneMint
class node_ch18,node_ch19,node_octal toneRose
class node_learner,node_keyboard,node_usb,node_oled toneIndigo
```

## Components

### Early examples

- [Chapter 2 example](https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/blob/main/Chapter%2002/main.c): `Chapter 02/main.c`
- [Chapter 3 demos](https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/tree/main/Chapter%2003): `Chapter 03`

### Keyboard and transport

- [Chapter 16 demos](https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/tree/main/Chapter%2016): `Chapter 16`
- [Chapter 17 demos](https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/tree/main/Chapter%2017): `Chapter 17`
- **Intercore FIFO**

### OLED display

- [Display font data](https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/blob/main/Chapter%2018/ssd1306_font.h): `Chapter 18/ssd1306_font.h`

### Computer demos

- [Chapter 18 emulator demo](https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/blob/main/Chapter%2018/kbDisplayIntegrated.c): `Chapter 18/kbDisplayIntegrated.c`
- [Chapter 19 emulator demo](https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/blob/main/Chapter%2019/kbDisplayIntegrated.c): `Chapter 19/kbDisplayIntegrated.c`
- [Octal conversion](https://github.com/lifewithdavid/raspberrypipico-baremetaladventures/blob/main/Chapter%2019/octal_conv.py): `Chapter 19/octal_conv.py`

### Other components

- **Experimenter**
- **Matrix keyboard**
- **USB terminal**
- **SSD1306 OLED**

## Connections

- Experimenter → Chapter 2 example: runs example
- Experimenter → Chapter 3 demos: runs demos
- Matrix keyboard → Chapter 17 demos: key input (evidence: `Chapter 17/Demo 5/kbDisplayIntegrated.c`)
- Chapter 17 demos → Intercore FIFO: sends key data (evidence: `Chapter 17/Demo 4/kbDisplayIntegrated.c`)
- USB terminal → Chapter 17 demos: terminal input
- Chapter 17 demos → USB terminal: prints results (evidence: `Chapter 17/Demo 5/kbDisplayIntegrated.c`)
- Chapter 17 demos → SSD1306 OLED: updates display
- Display font data → Chapter 18 emulator demo: font data (evidence: `Chapter 18/kbDisplayIntegrated.c`)
- Matrix keyboard → Chapter 18 emulator demo: key input
- Chapter 18 emulator demo → Intercore FIFO: exchanges values
- Chapter 18 emulator demo → SSD1306 OLED: updates display
- Display font data → Chapter 19 emulator demo: font data (evidence: `Chapter 19/kbDisplayIntegrated.c`)
- Matrix keyboard → Chapter 19 emulator demo: key input
- Chapter 19 emulator demo → SSD1306 OLED: updates display
- Experimenter → Chapter 16 demos: runs demos
- Chapter 16 demos → SSD1306 OLED: updates display
- Experimenter → Chapter 17 demos: runs demos
- Experimenter → Chapter 18 emulator demo: runs demo
- Experimenter → Chapter 19 emulator demo: runs demo
