The sketch sets up Service and Characteristic UUIDs compatible with the App so that it can find the SuperMini. After that operation should be intuitive from the App. Connect to the ButtonLED service and then scroll down to the "19B10011..." characteristic and tap on it. From there writing values controls the SuperMini. You can use the "Write New Value" button to write a '1' or '0' to turn the LES on or off. Or get adventurous and write 0x0F to make the LED blink. Writing any other value will stop the blinking.
You can check out the "Read" function by going to the "19B10012..." Characteristic and tapping on the "Read" button while holding down the "BOOT" button on the SuperMini. You should see a 1 or 0 returned depending on the state of the button. You will also notice that the button turns the LED on and off.
---------------------------------------------------------------------------------------------------------------------
This sketch should work on any ESP32 that supports BLE. You may need to change the LED and Button pins on line 22.
CanHobby.ca
Justin Maynard
Michiel Brink