Pandabyte LED Module: Digital and Analog Output Guide

by pandabyte in Circuits > Arduino

59 Views, 0 Favorites, 0 Comments

Pandabyte LED Module: Digital and Analog Output Guide

led.png

Pandabyte LED Module is a simple actuator module used for learning digital and analog output control with microcontrollers such as Arduino compatible boards, ESP32, or Raspberry Pi Pico. A key feature of this module is that it supports two connection methods:

  1. Traditional male header pins for standard jumper-wire connections OR
  2. 4-pin Grove connector for quick plug-and-play prototyping without complex wiring

In this guide, you will learn:

  1. Module pin configuration
  2. Digital output control (ON/OFF)
  3. Analog/PWM brightness control
  4. Circuit connections and Arduino programming examples

Supplies

items.png

Hardware:

  1. PandaByte LED Module
  2. Development Board (We will use PandaByte xC3m ESP32C3 Dev board)
  3. Grove Shield/Expansion Board
  4. Cables: Dupont, USB, and Grove

Software:

  1. Arduino IDE

Circuit Connections

LEDconnection.png

Perform the connection based on the table

Programming

Program 1: Digital Output

Turn the LED ON and OFF repeatedly using a digital signal.

int ledPin = 0;

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

void loop() {
digitalWrite(ledPin, HIGH); // LED ON
delay(1000);
digitalWrite(ledPin, LOW); // LED OFF
delay(1000);
}


Program 2: Analog Output

Change the brightness of the LED gradually from minimum to maximum and vice versa. A Pulse Width Modulation (PWM) signal is used to control the brightness levels.

int ledPin = 0;

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

void loop() {
// Fade In
for(int brightness = 0; brightness <= 255; brightness++) {
analogWrite(ledPin, brightness);
delay(10);
}

// Fade Out
for(int brightness = 255; brightness >= 0; brightness--) {
analogWrite(ledPin, brightness);
delay(10);
}
}

Output

Program 1: Digital Output

The LED will turn ON and OFF repeatedly at fixed time intervals (1 sec).


Program 2: Analog Output

The brightness of the LED will gradually increase from minimum to maximum and then decrease from maximum to minimum continuously.

Important Info

  1. All GPIO pins of dev boards (such as xC3m) support digital output. You can connect LED module to any of the GPIO pin
  2. Not all GPIO pins support analog (PWM) output. Make sure to verify the same in the pinout diagram dev board before using a particular pin for analog output.