Skip to content

makeabilitylab/arduino

Repository files navigation

Makeability Lab · Arduino Examples

License: MIT

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.

📖 New here? Start with the textbook.

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

🧩 Many sketches use our shared Arduino library

The MakeabilityLab Arduino Library provides reusable classes for physical computing — joystick input, OLED graphics and shapes, signal filters, scrolling graphs, and more. Many sketches #include its 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).

Getting started

  1. Install the Arduino IDE. See the textbook's Arduino IDE setup lesson for a guided walkthrough.
  2. 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).
  3. Open a sketch's .ino file. Each one lives in its own folder of the same name (an Arduino requirement).
  4. Select your board and port via Tools → Board and Tools → Port, then click Upload.
  5. 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.yaml that records their exact target.

What's inside

Folders are grouped by topic or hardware platform. Every sketch is self-contained — there's no shared application or build graph.

Learn-by-topic

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

Board-specific

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)

Helpers & supporting material

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

For contributors & maintainers

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 at templates/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 use UPPER_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.

About

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.

License

Released under the MIT License. © 2020–present Jon Froehlich and the Makeability Lab.

About

All things Arduino (for teaching and beyond!)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors