Blynk provides custom MicroPython builds specifically designed for IoT applications. These builds offer a standard MicroPython environment, enriched with numerous fixes, improvements, and additional features such as Smartphone Apps, Web Dashboards, secure Blynk.Cloud connection, device claiming and provisioning, OTA updates, configuration storage, and more.
- Sign up/Log in to your Blynk Account
- Install Blynk IoT App for iOS or Android
See instructions for ESP32 based devices
You can use ESP Launchpad to flash your device. You will need a Chrome-based browser.
- Plug your board into a USB port
- Click Connect in upper right corner and select your board
- Recommended: click Erase Flash on the DIY tab
- Select Application (generic boards vs specialized builds)
- Select Develop Kit variant based on flash size and type
- Click the Flash button (if disabled, try clicking the
Connect
button again) - Press Reset button on your board to run the MicroPython firmware
Alternatively, you can flash your ESP32 device manually
See instructions for Raspberry Pi Pico W
- Hold down the BOOTSEL button while plugging the board into a USB port
- Copy the latest UF2 firmware file to the USB mass storage device that appears
- Once programming of the new firmware is complete, the device will automatically reset and be ready for use
Warning
The automatic connection using Blynk Apps is currently in development.
For now please connect your device manually using REPL
The main.py
is a simple asyncio
-based script that defines the high level device operation.
It could be as simple as this:
from blynk import edgent
from time import ticks_ms
from asyncio import sleep_ms
async def publisher_task():
while True:
await sleep_ms(1000)
edgent.publish("Uptime", ticks_ms())
edgent.run_asyncio_loop([
publisher_task()
])
There are many ways to program your device. Here, we'll guide you through the two most popular options:
blynk.inject
- BLE-assisted device claiming and provisioningblynk.air
- OTA updates using Blynk.Console and Blynk.Appsblynk.time
- Time Zone handling (including DST transitions), Sunrise/Sunset calculationblynk.repl
- Remote MicroPyhton REPL for Blynk Terminalnetmgr
- Automatic network managementWiFi
: Maintains connection to the most reliable WiFi network (up to 16 configured networks)Ethernet
: SupportsStatic IP
orDHCP
network configurationCellular
: Provides connectivity through2G GSM
,EDGE
,3G
,4G LTE
,Cat M1
, or5G
networks usingPPP
config
- System-wide configuration registryaiontp
- A versatile asyncio-basedNTP
clientaiohttp
- Asyncio-basedHTTP v1.1
client with sessionkeep-alive
supportaiomqtt
- Asyncio-basedMQTT v3.1.1
clientaioinput
- An asyncio variant ofinput
functionaioprof
- Asyncio profiling toollogging
- System-wide, preconfigured loggingboard
- A unified way to access the board peripherals- Factory reset function
- Support for TLS certificate bundles
- For
ESP32
:coredump
- Collect crash reports remotely- OTA updates for MicroPython system firmware