@ajb2k3 thanks for the replay.
I'm defintely having problems initializing the env3 unit in uiflow, just trying to debug with some feedbacks:
after showing "env" (for 3-4 secs) it reboots and starts over. As I said, the env3 module works fine with my m5atom. Is there any way to debug my S3? Or can someone help with a .ino code or something which just initializes the unit and outputs something to debug on the serial? As I said, I'm new to all this, don't think i can manage that myself.
Maybe I just messed up my librarys somehow?
Here ist the python code, uiflow generates:
import os, sys, io
import M5
from M5 import *
import time
from hardware import *
from unit import *
label0 = None
i2c0 = None
env3_0 = None
def setup():
global label0, i2c0, env3_0, random
M5.begin()
Widgets.fillScreen(0x222222)
label0 = Widgets.Label("Text", 58, 32, 1.0, 0xffffff, 0xff0000, Widgets.FONTS.DejaVu18)
time.sleep(1)
label0.setText(str('Hello'))
time.sleep(1)
label0.setText(str('i2c'))
i2c0 = I2C(0, scl=Pin(1), sda=Pin(2), freq=100000)
time.sleep(1)
label0.setText(str('env'))
env3_0 = ENV(i2c=i2c0, type=3)
label0.setText(str('DONE!'))
def loop():
global label0, i2c0, env3_0, random
M5.update()
label0.setText(str(env3_0.read_temperature()))
time.sleep_ms(500)
if name == 'main':
try:
setup()
while True:
loop()
except (Exception, KeyboardInterrupt) as e:
try:
from utility import print_error_msg
print_error_msg(e)
except ImportError:
print("please update to latest firmware")
Thank,
Stefan