Documentation

Project1 - LED Brightness Control

Updated August 24, 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 Potentiometer 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

Potentiometer Sensor

GPIO A0

Blue LED

GPIO D9

Wiring Steps

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

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

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 pin number

Output not turning on

Check pin number 

Technical Article
By ZiraaSTEM