This project demonstrates communication between two ESP32 devices using Bluetooth Low Energy (BLE) with the BLEServer library. The setup involves a server-client architecture where data is exchanged seamlessly between the two devices.
To ensure both codes work seamlessly together, please refer to the BLEServer repository. It is crucial to make both the server and client codes work in tandem for successful communication and data exchange.
- UUID Characteristics: Utilizes UUID characteristics for sending and receiving data.
- Potentiometer Data Processing: The server reads and processes potentiometer data.
- PWM LED Control: The client uses the received data to control an LED with Pulse Width Modulation (PWM).
- Reads potentiometer data.
- Processes the data.
- Sends the processed data to the client via BLE.
- Receives data from the server.
- Uses the data to control an LED with PWM.
-
Hardware Requirements:
- Two ESP32 devices.
- A potentiometer.
- An LED.
-
Software Requirements:
- Arduino IDE or PlatformIO.
- BLEServer library.
-
Setup:
- Connect the potentiometer to the server ESP32.
- Connect the LED to the client ESP32.
- Upload the respective server and client code to the ESP32 devices.
-
Running the Project:
- Power on both ESP32 devices.
- The server will start reading potentiometer data and send it to the client.
- The client will receive the data and adjust the LED brightness accordingly.
For more detailed information on BLE with ESP32, refer to the ESP32 BLE UART Documentation.
This project showcases the capabilities of BLE communication between ESP32 devices, enabling real-time data exchange and control. It serves as a foundation for more complex IoT applications.
Feel free to explore and modify the code to suit your specific needs!