Control esp32 onboard LED using Cyberfly IoT platform

Cyberfly
3 min readOct 22, 2023

Please install our custom micropython firmware by reading the following article before continue here.

create a new wallet and a device by reading the following

create a new dashboard as follows

name the dashboard and click plus button to add widget
select switch widget
click on widget to configure

give label whatever you want select the device you created

add data for sent to device. here i give pin_no as variable and 2 as a value

GPIO 2 is the onboard LED on esp32

click set and save the dashboard by clicking floating button and save dashboard button.

wait some time to complete the transaction.

Now come to the program part

  1. open thonny IDE
  2. connect esp32 micro controller
  3. create a new file named main.py

replace the key_pair with your device key_pair which is downloaded(file name is device id) when creating the device and replace device_id with your created device id. change ssid with your home wifi name and change your wifi password for connect esp32 to internet.

you can get device id as follows

click eye button
copy device id

after modify the program click save button in thonny and select micropython device and run.

thats all.

now go back to cyberfly IoT dashboard to control LED of esp32.

thanks.

--

--