A teaching collection of ~260 Arduino sketches — plus supporting Python, PowerShell, and Processing helpers — that accompany the Makeability Lab Physical Computing textbook. Everything here is instructional material, written to be fun, engaging, and helpful for your individual learning journey.
These sketches are meant to be used alongside the lessons, which explain the wiring, the concepts, and the code step by step.
Textbook source & issues: github.com/makeabilitylab/physcomp
The MakeabilityLab Arduino Library provides reusable classes for physical computing — joystick input, OLED graphics and shapes, signal filters, scrolling graphs, and more. Many sketches
#includeits headers, so install it before compiling them.Install from the Arduino IDE: Sketch → Include Library → Manage Libraries…, search "MakeabilityLab", and click Install (it pulls in Adafruit GFX + SSD1306 automatically).
- Install the Arduino IDE. See the textbook's Arduino IDE setup lesson for a guided walkthrough.
- Install the MakeabilityLab library (above) and any third-party libraries a sketch lists in its header comment (most commonly Adafruit GFX + SSD1306 for the OLED examples).
- Open a sketch's
.inofile. Each one lives in its own folder of the same name (an Arduino requirement). - Select your board and port via
Tools → BoardandTools → Port, then click Upload. - Read the header comment at the top of every sketch — it documents the circuit (board + wiring), the required libraries, and a link to the matching textbook lesson.
💡 Different sketches target different boards (Uno, Leonardo, ESP32, Feather, …). Always check the header comment for the intended board. A few board-specific sketches also carry a small
sketch.yamlthat records their exact target.
Folders are grouped by topic or hardware platform. Every sketch is self-contained — there's no shared application or build graph.
| Folder | What it covers |
|---|---|
Basics/ |
analogRead/analogWrite, digitalRead/digitalWrite, serial, and tone() — the core I/O primitives |
OLED/ |
SSD1306 OLED graphics, animation, and small games |
AddressableLEDs/ |
NeoPixel and APA102 (DotStar) addressable RGB LEDs |
Sensors/ |
Accelerometers, microphones, color sensors, and more |
Filters/ |
Smoothing and filtering noisy sensor input |
Servo/ |
Driving servo motors |
Serial/ · Bluetooth/ |
Serial and Bluetooth communication |
GameController/ · HumanInterfaceDevice/ |
USB HID — emulating a mouse/keyboard/game controller (Leonardo-class boards) |
PlayingMusic/ |
Playing tones and MP3 audio |
| Folder | Board |
|---|---|
ESP32/ |
ESP32 dev boards (WiFi/Bluetooth) |
UnoR4WiFi/ |
Arduino Uno R4 WiFi |
CPX/ |
Adafruit Circuit Playground Express |
nRF52840/ |
Adafruit nRF52840 Feather |
RedBearDuo/ |
RedBear Duo (legacy) |
| Folder | What it is |
|---|---|
Python/ |
Host-side serial readers and tools (Python 3 + pyserial) |
PowerShell/ |
Windows helper scripts |
Processing/ |
Processing sketches (legacy — the project has shifted to p5.js) |
templates/ |
A copy-paste starting point for new sketches |
docs/ |
Repository conventions and maintenance notes |
This repo is being modernized for the textbook's v2.0 release. If you're editing or adding sketches, please match the existing conventions:
- Sketch headers follow a standard template — see
docs/sketch-header-template.md, with a compile-checked starting point attemplates/SketchTemplate/. - Textbook links in headers point to specific lessons; keep them in lockstep with the live textbook.
- Naming: member/global variables use a leading underscore (
_display); constants useUPPER_SNAKE_CASE. - Some sketches are intentionally kept but not expected to compile on current toolchains — these are tracked in
docs/legacy-sketches.md.
Bug reports and suggestions are welcome via GitHub Issues.
Created and maintained by Jon Froehlich and the Makeability Lab at the University of Washington, for use in physical computing courses and the accompanying Physical Computing textbook.
Released under the MIT License. © 2020–present Jon Froehlich and the Makeability Lab.