Turning the Dial: My Journey with Arduino’s Potentiometer Circuit

When I first started with Arduino, the Blinking LED project was my introduction, and it was definitely a steep learning curve. Now that I’ve moved on to Circuit 2, using a potentiometer to control LED brightness, I was excited to see how everything I learned would start to come together. This project gave me the chance to explore analog input and gain a better understanding of how sensors and resistors can interact to affect circuit behavior. Let me take you through the project, the challenges I encountered, and my experience with an additional extension challenge that made me push my coding and circuit skills further.

Since this was my second circuit in this Arduino series, I was more familiar with the basics of breadboarding, wiring, and interpreting the code. It was exciting to see that, with Circuit 2, setting everything up was smoother. Unlike my first attempt, where I was nervous about every connection, this time I felt a little bit more comfortable navigating the wiring and code, especially since the potentiometer only had three pins to connect.



After I finished setting up the initial circuit, I realized that it wasn’t always clear whether the potentiometer was changing the LEDs' brightness or just the rate they blinked. I would turn the lights off in my room and turn them back on just to see if maybe it was too bright for me to see the difference. When testing, both LEDs seemed to react similarly in terms of blinking, and at first, it was hard to tell if I was achieving the intended brightness control or simply adjusting blink rates. I felt like I was going crazy. This unexpected confusion had me going back and forth between my wiring of the jumper wires and code, double-checking values and testing repeatedly to ensure I was getting the effect I wanted.






Challenges:

After completing the basic circuit, I wanted to take on an extension challenge to test what else I could do with the potentiometer. My goal was to use the potentiometer to control two LEDs in opposite ways: as one LED brightened, the other would dim, and vice versa. This involved adjusting my code to make each LED respond differently to the same input.

Coding was by far the trickiest and most frustrating part for me, especially when it came to mapping the values correctly for two LEDs and making them respond as opposites. Even after reading through the example code and reworking it several times, I struggled to get one LED to dim while the other brightened in a smooth and consistent way. The more I changed the code, the more it seemed I was just adjusting the blink rate rather than controlling the brightness of each LED. Overall, this was very frustrating because just when I felt like I was getting the hang of it, I was knocked down two notches.


Here is a quick video with the codes of all the circuit plays and extension challenges that I was able to explore.









Reflection:

It was really frustrating not being able to get the extension challenge to work, especially after spending so much time adjusting the code and wiring. I’m still unsure if the issue was in the logic of the code, the mapping function, or possibly both. I’m looking forward to reading my peers’ blogs to see if anyone managed to get the two LEDs working in this “opposite” effect, and hopefully, I can figure out what I missed by learning from their experiences. Although this extension challenge didn’t go as planned, working with the potentiometer in Circuit 2 gave me valuable experiences. Even though coding felt like a constant struggle, each project seems to build my understanding little by little. I’ll definitely keep experimenting with it, but I’m glad for this community to share ideas and insights with.

Looking forward to diving into the next circuit, hopefully with a bit more coding luck!



Comments

Popular posts from this blog

Hyperdocs

"Tracing the Roots of Educational Technology: My AI-Powered Exploration"

YouTube University