Header Ads Widget

How to make Esp32 Bluetooth Notice board

In this tutorial, I'll show you how to make a notice board using an ESP32 and Bluetooth.

The ESP32 is a powerful microcontroller that can be used to make all sorts of interesting projects. It has WiFi, Bluetooth and a whole bunch of pins that can be used for sensors or outputs. One of the most popular uses for the ESP32 is to make wearables like wristbands or clothing with LEDs. In this tutorial, we are going to use it as part of a notice board with Bluetooth so we can post messages from our phone or computer.

The ESP32 Bluetooth notice board is a great way to display information from your phone. It consists of a battery-powered ESP32 module, an OLED display and a Bluetooth 4.0 module.

The ESP32 Bluetooth notice board is very easy to set up and use. All you need to do is connect the device to your smartphone via Bluetooth, and then send the data that you want to show on the notice board wirelessly from your phone.

How to make Esp32 Bluetooth Notice board circuit:


How to make Esp32 Bluetooth Notice board code:


#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
#include "BluetoothSerial.h"

#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run
`make menuconfig` to and enable it
#endif

  BluetoothSerial SerialBT;

#define HARDWARE_TYPE MD_MAX72XX::FC16_HW

#define MAX_DEVICES 4
#define CLK_PIN 18
#define DATA_PIN 23
#define CS_PIN 15
int st;

MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);

uint8_t scrollSpeed = 50;

textEffect_t scrollEffect = PA_SCROLL_LEFT;

textPosition_t scrollAlign = PA_LEFT;

uint16_t scrollPause = 70;

#define BUF_SIZE 75

char curMessage[BUF_SIZE] = { "" };

char newMessage[BUF_SIZE] = { "MEWORKS TELUGU" };

bool newMessageAvailable = true;

String res = "";

void setup() {

  Serial.begin(9600);
  btStart();  //Serial.println("Bluetooth On");

  SerialBT.begin("ESP32_BT");  //Bluetooth device name
  Serial.println("The device started, now you can pair it with bluetooth!");
  delay(5000);
  P.begin();

  P.displayText(curMessage, scrollAlign, scrollSpeed, scrollPause, scrollEffect, scrollEffect);
}



void loop() {

  if (P.displayAnimate()) {

    if (newMessageAvailable) {

      strcpy(curMessage, newMessage);

      newMessageAvailable = false;
    }

    P.displayReset();
  }

  while (SerialBT.available())  // Read until the bluetooth client is sending.
  {
    char v = SerialBT.read();
    res = res + v;
    Serial.print(res);

    delay(1);

    res.toCharArray(newMessage, BUF_SIZE);

    newMessageAvailable = true;
  }
  res="";
}

Post a Comment

0 Comments