LED Matrix Information Board Via Bluetooth

Designed to display real-time scrolling text that can be directly controlled via Bluetooth.

BeginnerProtipOver 2 days92
LED Matrix Information Board Via Bluetooth

Things used in this project

Hardware components

Seeed Studio XIAO ESP32S3 Sense
Seeed Studio XIAO ESP32S3 Sense
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Jumper Wire Kit, Machine Pin
Jumper Wire Kit, Machine Pin

Story

Read more

Custom parts and enclosures

CASSING UNTUK MAX7219 LED DAN ESP32S3

Ini adalah cassing untuk ditempatkan diatas meja

Schematics

MCU XIAO ESP32-S3 DAN MAX7219 LED DOT MATRIX

PIN VCC --> 3V3
PIN GND --> GND
PIN DIN ----> D6
PIN CS -----> D5
PIN CLK----> D7

Code

Real-Time Digital Information Display Using LED Matrix with Wireless Control via BLE and ESP32

Arduino
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>

#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
#define MAX_DEVICES 4

#define DATA_PIN D6  // DIN
#define CS_PIN   D5  // CS
#define CLK_PIN  D7  // CLK

MD_Parola display = MD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

BLECharacteristic *pCharacteristic;
bool newText = true;
String receivedText = "UHUY LED READY TO PAIR";

#define SERVICE_UUID        "4fafc201-1fb5-459e-8fcc-c5c9c331914b"
#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8"

class MyCallbacks : public BLECharacteristicCallbacks {
  void onWrite(BLECharacteristic *pCharacteristic) {
    String newValue = String((char*)pCharacteristic->getData());  // ← SOLUSI FIX
    receivedText = newValue;
    newText = true;
  }
};

void setup() {
  Serial.begin(115200);
  display.begin();
  display.setIntensity(5);
  display.displayClear();

  BLEDevice::init("UHUY LED");
  BLEServer *pServer = BLEDevice::createServer();
  BLEService *pService = pServer->createService(SERVICE_UUID);
  pCharacteristic = pService->createCharacteristic(
                      CHARACTERISTIC_UUID,
                      BLECharacteristic::PROPERTY_WRITE
                    );
  pCharacteristic->setCallbacks(new MyCallbacks());
  pService->start();
  BLEAdvertising *pAdvertising = BLEDevice::getAdvertising();
  pAdvertising->start();

  Serial.println("BLE aktif. Kirim teks dari HP ke matrix.");
}

void loop() {
  if (newText) {
    display.displayClear();
    display.displayScroll(receivedText.c_str(), PA_LEFT, PA_SCROLL_LEFT, 65);
    while (!display.displayAnimate()) delay(10);
    newText = true;
  }
}

Credits

Muhammad Rio Agustan 77
1 project • 4 followers
Muhammad Allen
1 project • 3 followers
Ananda Agung Styadi 69062
1 project • 3 followers
Rayhan_Rahmatullah113
1 project • 2 followers
Hendra Kusumah
49 projects • 164 followers
Love hacking and making new things from IoT to robotics

Comments