Documentation

Project1 - LED Brightness Control

Updated June 30, 2026

1. What You Will Build

In this tutorial, you will learn how to build Project1 - LED Brightness Control using Easyplug Super Starter Kit .

By the end of this tutorial, your project will be able to:

  • Adjustable LED brightness using a potentiometer

  • Real-time analog input reading from the Arduino

2. What You Will Learn

After completing this tutorial, you should understand:

  • How to control LED brightness using a potentiometer

  • How to read analog input values from the potentiometer

  • How the code works step by step

3. Components Needed

No.

Component

Quantity

1

Easy Plug Control Board

1

2

Easy Plug Potetionmeter Sensor

1

3

Easy Plug Blue LED Module

1

4

200mm Blue RJ11 Cable

2

5

USB Cable

1

4. Software Needed

Use the tools below depending on your board.

Board

Software

Arduino

Arduino IDE 

Libraries Needed

No libraries needed

5. Circuit Connection

Connect the components as shown below.

Component Pin

Connect To

Potetionmeter Sensor

GPIO A0

Blue LED

GPIO D9

Wiring Steps

  1. Connect Potetionmeter Sensor to GPIO A0 on the board.

  2. Connect Blue LED to GPIO D9 on the board.

Circuit Diagram

Insert your circuit diagram or wiring image here.

6. Code

int potPin = A0;      // potentiometer input
int ledPin = 9;       // LED PWM pin
int potValue = 0;     
int brightness = 0;

void setup() {
  pinMode(ledPin, OUTPUT);
}

void loop() {
  potValue = analogRead(potPin);          // read potentiometer value (0-1023)
  
  brightness = map(potValue, 0, 1023, 0, 255); // convert to PWM range (0-255)

  analogWrite(ledPin, brightness);        // control LED brightness
}

7. Upload / Run the Project

  1. Connect the board to your computer using USB.

  2. Open the code in Arduino IDE.

  3. Select the correct board.

  4. Select the correct port.

  5. Click Upload.

  6. Open the Serial Monitor if needed.

8. Expected Result

When the project is working correctly:

  • Potentiometer turn → LED brightness increases/decreases smoothly

9. Troubleshooting

Problem

Possible Fix

Board not detected

Check USB cable, driver, board, and port selection

Code upload failed

Select the correct board and COM port

Sensor not working

Check VCC, GND, and signal pin wiring

Output not turning on

Check pin number and component polarity

Wrong readings

Check sensor voltage and calibration

Technical Article
By ZiraaSTEM