Chart Android Bluetooth Low Energy app graphs raw numerical string data from an Internet Of Things (IOT) device like the ESP32-S3 using MicroPython optimized for microcontrollers. Fun educational projects are illustrated for your enjoyment below.
Amazon Parts
ESP32-S3 Buy at least 512K RAM version
Setup Instructions
- Install MicroPython on ESP32-S3 device
- Install Thorny IDE
- Download and save library file onto ESP32-S3 device
MicroPython Random Number Code
from BluetoothLE import ESP32_BLE
import random
from time import sleep_ms
# initialize bluetooth with name, "ESP32BLE-Random"
ble = ESP32_BLE("ESP32BLE-Random")
# loop forever
while True:
# random number between 1-100
number: int = random.randrange(100) + 1
# push data to Android app
ble.send(str(number))
# sleep half a second
sleep_ms(500)