I pretty much used the example code, along with a BLYNK_WRITE function, so that I could toggle an LED. On my LOLIN ESP-32 board, the LED is on Pin 22. I’m using a Blynk button widget on Virtual Pin 0 to control it. Here’s the code:
int LED = 22;
char auth = "Your_Blynk_Token";
The connection process isn’t 100% intuitive. so here’s how to do that:
With your Blynk dashboard in the STOPPED mode, click on the greyed out Bluetooth widget. You’ll be presented with a blue botton that says “Connect BLE Device.” Click it, and you’ll see a list of all the available Bluetooth devices in range. Scroll to “Blynk” and hit OK. It should now say “#Blynk connected.” Hurrah! Now, click OK at the top of the screen, and you’ll be returned to your dashboard. The Bluetooth widget should be blue, indicating that it’s connected to your device.
- Arduino IDE 1.8.5
- Blynk library 0.5.3
- Blynk iOS app version 2.23.0(4)