Advanced I/O
Table of Contents
Video. In this lesson series, you will learn about OLED displays, addressable RGB LEDs, servo motors, vibration motors, and more! You can combine your learning to create interactive projects like Flappy Bird, Pong, rainbow LED animations, sensor-driven gauges, and haptic feedback systems.
Welcome π to the third module in your Physical Computing adventure: Advanced I/O. In this module, youβll move beyond basic LEDs and buttons to explore new output modalitiesβlike OLED displays, addressable RGB LED strips, servo motors, and vibration motors for haptic feedbackβas well as new input techniques like signal smoothing to tame noisy sensor data. Donβt be intimidated by the advanced prefix. The content here isnβt more complicated than the first two modules; it simply builds on them!
Prerequisites: These lessons assume youβve completed (or are comfortable with) the material in:
In particular, you should be familiar with
analogRead,analogWrite, digital I/O, and basic circuit building before starting here.
As usual, these lessons are interactiveβthey assume youβre following along and building with us. They are designed to be completed in order within each section; however, if you do not have a component (e.g., like an OLED display), itβs OK to skip ahead to the next lesson. Youβll still be able to build and understand most things!
All Arduino code is open source and in this GitHub repository.
Output
In the Output lessons, youβll learn four new output modalities used in modern interactive devicesβfrom smartwatches to game controllers to art installations. The first three lessons use components with built-in driver circuits (the OLEDβs display controller, addressable LEDsβ WS2812B chips, and servosβ internal feedback circuits), so the wiring is simple and libraries handle the complex signaling. The fourth lesson introduces a raw DC motor with no built-in intelligence, teaching you why transistors, flyback diodes, and resistor calculations become necessary.
Lesson 1: OLED Displays
In this lesson, you will learn about organic light-emitting diode (OLED) displays, basic graphics programming with the Adafruit GFX library, and a brief introduction to two serial communication protocols: I2C (Inter-Integrated Circuit) and SPI (Serial Peripheral Interface). Youβll draw shapes, render text, create animations, and build interactive visualizations driven by sensor input.
Lesson 2: Addressable LEDs
In this lesson, you will learn about addressable RGB LEDs (WS2812B/SK6812, commonly known as NeoPixels), how their built-in driver chips enable individual pixel control from a single data pin, and how to use the Adafruit NeoPixel library to create colorful animations and sensor-driven light displays. Youβll also learn how to calculate power requirements and when to use an external power supply.
Lesson 3: Servo Motors
In this lesson, you will learn about servo motors, how their internal feedback loop enables precise angular positioning, and how servo PWM signals differ from analogWrite() PWM. Youβll use the Arduino Servo library to build interactive projects including a potentiometer-controlled servo and a sensor-driven physical gauge.
Lesson 4: Vibromotors
In this lesson, you will learn about vibration motors (vibromotors), their role in haptic technology, and how to connect them with microcontrollers. Unlike the previous three output devices, vibromotors are raw DC motors with no built-in driverβso youβll learn why transistors, flyback diodes, and base resistor calculations are necessary, and how to use PWM through a transistor to control vibration intensity and create haptic patterns.
Input
In the Input lesson, youβll learn techniques for cleaning up noisy sensor dataβan essential skill for building responsive, reliable physical computing projects.
Lesson 1: Smoothing Input
In this lesson, you will learn how to smooth incoming sensor data using basic digital signal processing. Weβll cover a class of digital filters called smoothing algorithms (aka signal filters), including the moving average, exponentially weighted moving average, and moving median filters. Youβll learn why smoothing is helpful, how to tune filter parameters, and the tradeoffs involved.
Whatβs next?
Once youβve completed the Advanced I/O lessons, youβll have a solid toolkit of output and input techniques. From here, you might explore topics like serial communication between Arduino and your computer, working with additional sensors (accelerometers, distance sensors), or diving deeper into signal processing for more sophisticated filtering and frequency analysis.