# Potentiometer Control

In this project, I discover the uses of potentiometers when they control things.

# Introduction

On a Sunday morning, the 23rd of November, solemnity of Christ the King, I was messing around with my circuits, and wanted to make a LED fade in and out with a material controller, instead of putting values into the serial monitor or anything, I decided to use potentiometers because I had seen a robot arm controlled by a mini itself, which was really cool.

I wanted the potentiometer to control a LED's brightness, sort of like the lights in our living room. I built the circuit right away with no trouble because I have learned how to work with circuits from the flying fish over project.

The component list: Ardunio UNO, active buzzer, LED, 220khm resistor, potentiometer, jumper wires, breadboard extension module

Here is a diagram of the circuit:

[![Screenshot_2025-11-25_08-09-20.png](https://wiki.piflyer.net/uploads/images/gallery/2025-11/scaled-1680-/screenshot-2025-11-25-08-09-20.png)](https://wiki.piflyer.net/uploads/images/gallery/2025-11/screenshot-2025-11-25-08-09-20.png)

# The Code

Since designing it was pretty simple, writing the code was also fairly straightforward.

[![Screenshot_2025-11-25_08-11-39.png](https://wiki.piflyer.net/uploads/images/gallery/2025-11/scaled-1680-/screenshot-2025-11-25-08-11-39.png)](https://wiki.piflyer.net/uploads/images/gallery/2025-11/screenshot-2025-11-25-08-11-39.png)

I used digital pin 9 for the LED control and the A0 for the potentiometer control.

Another cool use for this is a piezo, because it makes all the different notes, like a tuner.