Chapters
This textbook is organized into 20 chapters covering 350 concepts.
Chapter Overview
- Computational Thinking and Physical Computing - Introduces computational thinking and the physical-computing ideas behind every clock: microcontrollers, sensors, actuators, and the Raspberry Pi Pico.
- Electronics Fundamentals and Breadboard Wiring - Covers the electronics every clock project needs: voltage, current, Ohm's Law, LEDs, resistors, breadboards, jumper wires, and safe power.
- MicroPython Basics: Variables and Data Types - Teaches MicroPython basics in Thonny: variables, numbers, strings, lists, tuples, dictionaries, arithmetic, and print debugging.
- Control Flow, Functions, and Modules - Teaches conditionals, loops, functions, modules, and simple classes so students can structure clock programs into reusable pieces.
- The Pico Platform: Pins, Files, and Firmware - Explores the Pico platform: GPIO pins, pull-up resistors, flash file system, firmware, boot files, and the Pico W wireless variant.
- Getting the Time in MicroPython - Shows how to read the current time with localtime(), time tuples, and the utime module, and how to format hours, minutes, dates, and 12/24-hour displays.
- Buttons, Interrupts, and State Machines - Adds interactivity with push buttons, debouncing, interrupts, state machines, mode cycling, and rotary encoders for setting the time.
- Communication Buses: I2C, SPI, and UART - Explains how a microcontroller talks to peripherals over I2C, SPI, and UART, including pins, addressing, speed, and signal integrity.
- LED Displays and the First Digital Clock - Builds the first real clocks with seven-segment LED displays and the TM1637 driver, including colon flashing and multiplexing.
- Coordinates, Trigonometry, and Clock Geometry - Introduces the coordinate systems, trigonometry, and polar geometry needed to place clock hands, tick marks, and digits on a screen.
- OLED Displays and Framebuffers - Introduces OLED displays, the SSD1306 driver, and the framebuffer model, including show and fill commands and display resolution.
- Drawing Shapes, Text, and Animation - Covers drawing lines, shapes, and text on framebuffer displays, plus custom fonts, scaled digits, animation, and partial updates.
- Real-Time Clocks and the DS3231 - Adds accurate, power-loss-proof timekeeping with the DS3231 real-time clock, BCD registers, battery backup, and temperature compensation.
- WiFi, NTP, and Time Accuracy - Connects the Pico W to WiFi to synchronize time with NTP, handle time zones and daylight saving, and measure and correct clock drift.
- Color Displays and Smartwatch Faces - Moves to color TFT and round smartwatch displays, covering RGB565 encoding, color palettes, display drivers, and analog and digital watch faces.
- NeoPixels and Shift Register Clocks - Explores addressable NeoPixel LEDs and 74HC595 shift registers for creative binary, Fibonacci, and seven-segment art clocks.
- Sound, Alarms, and Timers - Adds sound and timing features: PWM buzzers, I2S audio with a DAC, alarm tones, snooze, stopwatches, countdown timers, and world clocks.
- Sensors, Power, and Low-Power Design - Covers photosensors, ADC readings, motion sensors, and power design including batteries, regulators, sleep modes, and current budgeting.
- E-Paper and Weather Displays - Presents e-paper displays and weather station projects, including bistable displays, refresh strategies, ghosting, and temperature and humidity readouts.
- Design, Testing, and AI-Assisted Development - Guides students through planning, testing, debugging, cost analysis, enclosures, AI-assisted coding, and presenting a custom clock project.
How to Use This Textbook
Work through the chapters in order. Each chapter builds on the ones before it, so the concepts you need are always introduced first. Skim the concept list at the top of each chapter before you start, and finish the prerequisite chapters before moving to advanced ones.
Note: Each chapter includes a list of concepts covered. Make sure to complete prerequisites before moving to advanced chapters.