Uploaded July 2024 | Updated September 2026, 2 weeks ago
In this tutorial, we demonstrate how to use a potentiometer as an analog input to control the brightness of an LED using an Arduino. We cover the code in detail, showing how to read the potentiometer's value, map it to control an LED, and print the value to the serial monitor.
đź•’ Timestamps
00:00 - 00:05: Introduction
00:05 - 00:35: Declaring Variables
00:35 - 00:47: Setup Function
00:47 - 01:07: Reading Potentiometer Value
01:07 - 01:23: Mapping Value for LED Brightness
01:23 - 01:36: Setting LED Brightness
01:36 - 01:55: Sending Value to Serial Monitor
01:55 - 02:08: Adding Delay
02:08 - 02:22: Demonstration Recap
02:22 - 02:34: Upload and Test
02:34 - 02:57: Application and Uses
02:57 - 03:05: Conclusion
This series is possible thanks to the kind support of Sunfounder, an online store that sells high-quality hardware and kits for Makers. Visit Sunfounder at https://sunfounder.com.
In this series, I use the SunFounder 3 in 1 Ultimate Starter Kit with Original Arduino Uno R4 Minima, including high-quality sensors, actuators, power supplies, and Original Arduino Uno R4 Minima for diverse projects and skill-building. Get it (affiliate link): sunfounder.com/collections/arduino-kits/products/sunfounder-3-in-1-ultimate-starter-kit-with-original-arduino-uno-r4-minima?ref=bXS65iah
đź“– Main Learning Objectives
Understand how to declare and initialize variables for Arduino projects.
Learn to set up and configure pins for input and output.
Read analog values from a potentiometer using analogRead.
Map analog values to a different range suitable for controlling outputs.
Control LED brightness using analogWrite.
Send data to the serial monitor for debugging and monitoring.
Implement a delay to improve the readability of the serial output.
Invitation to Subscribe
If you found this tutorial helpful, please give it a thumbs up and subscribe to our channel for more Arduino tutorials. Your support motivates us to keep crafting content that fuels your maker journey. Until next time, keep experimenting and exploring.
In this tutorial, we demonstrate how to use a potentiometer as an analog input to control the brightness of an LED using an Arduino. We cover the code in detail, showing how to read the potentiometer's value, map it to control an LED, and print the value to the serial monitor.
đź•’ Timestamps
00:00 - 00:05: Introduction
00:05 - 00:35: Declaring Variables
00:35 - 00:47: Setup Function
00:47 - 01:07: Reading Potentiometer Value
01:07 - 01:23: Mapping Value for LED Brightness
01:23 - 01:36: Setting LED Brightness
01:36 - 01:55: Sending Value to Serial Monitor
01:55 - 02:08: Adding Delay
02:08 - 02:22: Demonstration Recap
02:22 - 02:34: Upload and Test
02:34 - 02:57: Application and Uses
02:57 - 03:05: Conclusion
This series is possible thanks to the kind support of Sunfounder, an online store that sells high-quality hardware and kits for Makers. Visit Sunfounder at https://sunfounder.com.
In this series, I use the SunFounder 3 in 1 Ultimate Starter Kit with Original Arduino Uno R4 Minima, including high-quality sensors, actuators, power supplies, and Original Arduino Uno R4 Minima for diverse projects and skill-building. Get it (affiliate link): sunfounder.com/collections/arduino-kits/products/sunfounder-3-in-1-ultimate-starter-kit-with-original-arduino-uno-r4-minima?ref=bXS65iah
đź“– Main Learning Objectives
Understand how to declare and initialize variables for Arduino projects.
Learn to set up and configure pins for input and output.
Read analog values from a potentiometer using analogRead.
Map analog values to a different range suitable for controlling outputs.
Control LED brightness using analogWrite.
Send data to the serial monitor for debugging and monitoring.
Implement a delay to improve the readability of the serial output.
Invitation to Subscribe
If you found this tutorial helpful, please give it a thumbs up and subscribe to our channel for more Arduino tutorials. Your support motivates us to keep crafting content that fuels your maker journey. Until next time, keep experimenting and exploring.










