What I wanted to learn, and why it interested me: I wanted to learn how simple computer inputs—like key mappings and media controls—could be created using an Arduino Micro. This interested me because I’ve always liked small, functional hardware projects, and I wanted to see how little circuitry it actually takes to control a computer. I learned that building a basic input device is much easier than I expected, and the circuits involved are surprisingly simple. This project showed me how practical the Arduino Micro can be, and it’s inspired me to try more projects like this in the future.
Final outcome: The final outcome is a small media‑control station with a single button and a potentiometer, and it works really well on the breadboard. Even though it’s simple, it leaves a lot of room for expansion and higher‑quality components. I can already imagine upgrading it with nicer switches, adding more hotkey functions, or even exploring wireless features like Bluetooth in a future version.
Images of final creative/exploratory output
Final circuit for media station.
Video of media station pausing/playing and volume being raised/lowered.
Process images from development towards creative/exploratory output
The 100k resistor in this photo was originally added because I thought it was necessary, but once I switched to using INPUT_PULLUP in the final code, it became unnecessary.
Pins were soldered into the arduino micro for use with a breadboard.
Process and reflection:
This was my first time working with the Arduino Micro, and I really enjoyed the process. The small form factor immediately got me thinking about how compact a useful device can be. I started by wiring a simple circuit with a button, a potentiometer, and a killswitch jumper. Even though the circuit was minimal, learning the Micro’s pin layout and figuring out the correct inputs was a big part of the experience. After that, I wrote the code, which turned out to be surprisingly simple, but it was satisfying to see everything come together into a functional media controller that can pause, play, and adjust volume. What surprised me most was how such a small amount of hardware and code could create something genuinely practical. This project also got me thinking about future versions, maybe using keyboard switches or expanding it into a more polished desktop tool.
Technical details
Electrical schematic: Important note: The button scene going from pin 3 to ground is representing a jumper to ground I was using as a bailtout. This can be scene more in the code.
/*
60-223 Intro to Physical Computing, fall 2025
Domain-specific Skill Building exercise: Novel Computer Input
This sketch makes the button in my circuit act as a pause/play button for my computer.
It also makes the potentiometer control my computers master volume.
So this sketch makes a button and potentiometer into a practical media station for on youre desk.
Pin mapping:
Arduino pin | role | details
------------------------------
4 input button
3 bailout jumper
A0 input potentiometer
Released to the public domain by the author, January 2024
Robert Zacharias, rzachari@andrew.cmu.edu
*/
#include <HID-Project.h>
const int BUTTON_PIN = 4;
const int SAFETY_PIN = 3;
const int POT_PIN = A0;
int lastPotMapped = 0;
void setup() {
pinMode(BUTTON_PIN, INPUT_PULLUP);
pinMode(SAFETY_PIN, INPUT_PULLUP);
pinMode(POT_PIN, INPUT);
Consumer.begin();
}
void loop() {
if (digitalRead(SAFETY_PIN) == HIGH) {
while (1);
}
if (digitalRead(BUTTON_PIN) == LOW) {
Consumer.write(MEDIA_PLAY_PAUSE);
delay(250);
}
int potValue = analogRead(POT_PIN);
int mapped = map(potValue, 0, 1023, 0, 50);
if (mapped != lastPotMapped) {
if (mapped > lastPotMapped) {
Consumer.write(MEDIA_VOLUME_UP);
} else {
Consumer.write(MEDIA_VOLUME_DOWN);
}
lastPotMapped = mapped;
delay(5);
}
}