Skip to content

Robot Faces - OLED Kit - List of Hands on Labs

Each lesson is a short, hands-on walkthrough of one idea, with a complete program you can paste onto your microcontroller and a picture of what it draws on a real 128 by 64 display.

Getting Oriented

Lesson What you'll learn
Screen Coordinates How x and y map to the display, and why y grows downward
Basic Drawing Commands A tour of every framebuffer command, plus the standard setup preamble

The Drawing Primitives

These eight lessons cover every drawing command the MicroPython framebuffer offers. Work through them in order and you will have the complete toolkit.

Lesson Command
Pixel pixel() — the single dot everything else is built from
Line hline(), vline(), and line() — including the eyebrow rule
Rectangle rect() and fill_rect(), and how to erase with black
Ellipse ellipse() and the quadrant fill codes
Circle Circles as a special case of the ellipse
Polygon poly() for triangles, stars, and any shape you can list points for
Text text() and the 8 by 8 font layout math
Scroll scroll() for sliding the whole buffer at once
Blit blit() for stamping a finished sprite, with transparency

Building Faces

Lesson What you'll learn
Basic Face Layouts Placing eyes and a mouth so they read as a face
Eye Scanner Animating a pupil that sweeps back and forth
Eyebrows The single most expressive feature on a robot face
Winking with a Smile Combining a closed eye and a curved mouth
Blinking Reading a push button and reacting with both eyes
Emotion Types The core expression set and how to draw each one
Sleeping Faces Closed eyes, drooping eyebrows, and a drifting Zzz

Thinking About Your Code

The lessons above teach you how to make the hardware do something. These eight teach you how to think about the code you just wrote — the four habits that transfer to every program you will ever write, taught on code you already understand.

Work them in order, and only after you have finished the lessons above. Each one solves a problem you have already felt, which is what makes it stick.

Lesson Thinking skill What you'll learn
The Face Module Decomposition, abstraction Move the duplicated face parts into one shared file
The Emotion Table Pattern recognition Seven emotions become seven rows of data and one function
Five Broken Faces Debugging Five planted bugs, a method for finding them, and a symptom table
Trace and Watch Debugging by measurement An on-screen instrument panel for bugs you cannot photograph
Keyframes Algorithms An animation is a list of poses, and one player runs them all
A Face With a Memory Abstraction, modeling States and transitions as tables, instead of tangled if-statements
Only Redraw What Changed Decomposition, measurement Redraw just the moving part, then measure whether it helped
Design Your Own Emotion All four Invent an expression and test whether a stranger can read it
How Fast Is a Face? Measurement, algorithms Race a hand-written ellipse() against the built-in, and explain the gap

Kit Packaging & Accessories

Resource Description
Box Cover Guide & Overview Printable box cover specifications and instructions
9" × 6" Box Cover (1 per Sheet) Printable 9" × 6" box cover formatted for 8.5" × 11" landscape paper
6" × 4" Dual Box Covers (2 per Sheet) Printable 6" × 4" dual box covers formatted on a single 8.5" × 11" portrait sheet