- Intro to Output
- Intro to Input
Welcome 👋 to the second module in your Physical Computing journey: Introduction to Microcontrollers (using Arduino).
Although you can begin your journey here, we strongly recommend that you complete the first module on Intro to Electronics first. This will allow you to have a more deep understanding of the content. We will refer back to content from the first module.
There are many Arduino resources online, many good, some bad. Our two favorites are, perhaps, Adafruit’s 18-Step Guide and Jeremy Blum’s Exploring Arduino: Tools and Techniques for Engineering Wizardry, 2nd Edition, Wiley, 2020. See our Resources page for more.
Our lessons are different both in approach and scope. They are based on years of experience in teaching physical computing—to design students, computer scientists, and engineers at the undergraduate and graduate level—and attempts to address common confusions head-on.
Thus, while other resources start with digital/analog input (or quickly intermix input and output), we’ve found that it’s easier to start with output. For novices, input is simply harder—it requires an understanding (or at least an awareness) of concepts like pull-down resistors, voltage dividers, and that a microcontroller reads voltages rather than current or resistance.
So, our lessons start and stick with output to solidify understanding of how you to programmatically control microcontroller pins before adding in input—where the fun, of course, really starts! Moreover, most resources—at least those we are aware of—strike a different balance between depth and breadth. We love Adafruit’s tutorials but they tend towards step-by-step construction recipes rather than explaining why or how things work. As a college-level resource, we attempt to provide a deeper understanding at a cost of complexity and longer lessons. But we think it’s worth it.
Let the fun begin!
These tutorials are interactive and designed to be completed in order. All Arduino code is open source and in this GitHub repository.
Introduces the Arduino power and ground pins, powering an initial LED circuit with a current limiting resistor, and plugging components into the Arduino.
Introduces the Arduino IDE and the ability to programmatically control Arduino GPIO pins to turn an LED on and off via
Introduces some basic debugging approaches for Arduino, with a specific focus on
Demonstrates how to gradually fade an LED on and off by using
Introduces the concept of using Arduino GPIO pins as either current sources or sinks by hooking up two LED circuit configurations: one circuit with the LED cathode towards GND and another with the LED anode towards GND.
Introduces RGB LEDs, using both common anode and cathode versions, and independently controlling brightness and hue.
In this lesson, we will learn how to blink multiple LEDs at different rates and build our first C/C++ class, which will greatly simplify our code and, as an added bonus, reduce its size by eliminating code redundancy.
Introduces buttons (aka momentary switches), digital input, using Arduino’s
digitalRead function, and pull-up and pull-down resistors.
In this lesson, we’ll learn about “contact bouncing” and how to “debounce” to make our digital input more reliable.
This lesson introduces potentiometers and rheostats, analog input, and using Arduino’s
analogRead function. Also shows how to use Tinkercad to prototype and test circuits in an online simulator and how to use a multimeter to measure current.
Introduces force-sensitive resistors (FSRs), how to use two-legged variable resistors with microcontrollers (including FSRs), and how to make a force-piano. Very Jedi-like!