Hello,
I'm certainly missing something super obvious here. So i need your help
I tried the sample code provided in the doc but it is not easy for me.
Also if you can point me to more tutorials on blynk feel free to do it.
Environment
- M5StickC+
- FW 1.9.8
- NCIR HAT
Issue
When using Blynk nothing happens in Run mode. M5Stick screen remains stalled, with Labels with its default value. Nothing also on the Blynk app side.
M5Stick works fine, when i remove all the blynk related stuff it works great. See other post for the code
What am I missing here?
from m5stack import *
from m5ui import *
from uiflow import *
from IoTcloud import blynk
import hat
import hat
setScreenColor(0x000000)
hat_ncir_0 = hat.get(hat.NCIR)
pool_temp_pin = None
pool_temp = None
label1 = M5TextBox(93, 58, "Text", lcd.FONT_DejaVu56, 0xFFFFFF, rotate=90)
title0 = M5Title(title="Title", x=30, fgcolor=0xFFFFFF, bgcolor=0x0000FF)
def blynk_read_v1(v_pin):
global pool_temp_pin, pool_temp
pool_temp_pin = v_pin
pool_temp = hat_ncir_0.temperature
title0.setTitle('Pool Temp')
label1.setText(str(pool_temp))
blynk1.virtual_write(pool_temp, pool_temp)
pass
blynk1 = blynk.Blynk(token='1234567890')
blynk1.handle_event('read v1', blynk_read_v1)
while True:
blynk1.run()
wait_ms(2)