Advanced I/O

Table of Contents

  1. Output
    1. Lesson 1: OLED Displays
    2. Lesson 2: Addressable LEDs
    3. Lesson 3: Servo Motors
    4. Lesson 4: Vibromotors
  2. Input
    1. Lesson 1: Smoothing Input
  3. What’s next?

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:

  1. Intro to Electronics
  2. Intro to Microcontrollers Using Arduino

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.


This website was developed by Professor Jon E. Froehlich and the Makeability Lab using Just the Docs. If you found the website useful or use it in your teaching, we'd love to hear from you: jonf@cs.uw.edu. This website and all code is open source (website GitHub, Arduino GitHub, p5js GitHub). You can find the MakeabilityLab_Arduino_Library here. Found an error? File a GitHub Issue.

Made with β™‘ by the The Makeability Lab logo which is a large geometric M with an embedded L