A six-session CodeClub project that guides young programmers through building a fully functional MP3/karaoke player for the M5Stack Core S3 microcontroller.
This project is designed as a follow-on to the pyCalculator CodeClub project, and introduces more advanced Python concepts — classes, file I/O, string parsing, and event-driven programming — through the motivating goal of building something genuinely cool.
The lesson plans are hosted on GitHub Pages:
| Session | Title | Link |
|---|---|---|
| 1 | Meet the Track | Lesson 1 → |
| 2 | Songs from the SD Card | Lesson 2 → |
| 3 | Reading the Lyrics | Lesson 3 → |
| 4 | Making Music Play | Lesson 4 → |
| 5 | Keeping Time | Lesson 5 → |
| 6 | Sing Along! | Lesson 6 → |
| Session | New concepts |
|---|---|
| 1 | Python class, __init__, self, object instances |
| 2 | String slicing, rfind, strip, functions, for loops, tuples |
| 3 | File reading (open/with), split(), int(), nested lists, try/except |
| 4 | Callbacks, the @ decorator syntax, the global keyword |
| 5 | Tick-based updates, integer division (//, %), formatted strings |
| 6 | Searching a sorted list, the lookahead trick, combining all 6 lessons |
pyPod/
├── device/
│ ├── pypod.py # Teacher-written wrapper — hides hardware complexity
│ └── main.py # Student-written code — the finished 6-lesson project
├── docs/
│ ├── style.css # Shared stylesheet for all lesson pages
│ ├── lesson1.html
│ ├── lesson2.html
│ ├── lesson3.html
│ ├── lesson4.html
│ ├── lesson5.html
│ └── lesson6.html
└── .github/
└── WORKFLOW.md # Notes on the project workflow and pedagogical approach
All hardware complexity — LVGL UI, audio playback, timers, interrupt scheduling — is hidden inside pypod.py, which is written and deployed by the teacher before the session. Students only ever write simple, readable Python in main.py, importing named helpers from pypod:
from pypod import Track, add_track, play, on_song_selected, startThis keeps student code clean and beginner-friendly while still running real code on real hardware.
- M5Stack Core S3 — the target device
- MicroSD card inserted into the Core S3
/sd/music/— MP3 files namedSong Title (Artist).mp3/sd/transcripts/— Lyrics files namedSong Title.txt(LRC-style timestamps,M:SSformat)
- UIFlow 2 MicroPython firmware flashed to the device
- Flash the Core S3 with UIFlow 2 MicroPython firmware.
- Copy
device/pypod.pyto the root of the device filesystem. - Populate the MicroSD card with MP3s and matching transcript files.
- At the start of each session, deploy the student's current
main.pyto the device. - Open the lesson page for that session on the classroom screen.
MIT — free to use, adapt, and share for educational purposes.