Blynk and M5Stack

Using my M5Stack with Blynk makes sense: it has plenty sensors and a display and LEDs.

❯ export AMPY_PORT=/dev/ttyUSB0
❯ export AMPY_BAUD=115200
❯ ampy ls /flash
❯ ampy mkdir /flash/lib
❯ ampy put /flash/lib/
❯ ampy get /flash/ >
# Edit to include /flash/lib in the Python search path
# Like this:
#import machine, os, sys
#    sd = machine.SDCard(slot=3, miso=19, mosi=23, sck=18, cs=4)
#    os.mount(sd, '/sd')
#    print("SD card mounted at \"/sd\"")
#    sys.path.append('/flash/lib')
#    pass
❯ ampy put /flash/

Sample program:

from m5stack import *
from m5ui import *
from uiflow import *

import BlynkLib

blynk = BlynkLib.Blynk(BLYNK_AUTH)


# Register virtual pin handler
def v3_write_handler(value):
  s='Current slider value:'+str(v)+'.'
  lcd.text(0, 20, s)

while True:

Using the Bylnk App update Virtual Pin 3 and the value should be displayed on the M5Stack’s LCD.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create your website at
Get started
%d bloggers like this: