Core S3 with ENV3 sensor bug?
-
Hi everyone,
I'm quite new to the m5stack community and I today received my Core S3 and some sensors.
I've been playing around with a m5atom matrix since a couple of weeks and wanted to step up the game.For testing, I just wanted to output data from the ENV3 sensor to the display, but it did not work... it took me quite a while to realize, that the core was power cycling when the app is running and the sensor is connected.
I stripped down my program just leaving the initializing part of the sensor in it, and had the same issue...
I also tried port B and C, swapped around the pins on the I2C init, tried it with the ENV1 and ENV2 unit in uiflow... all of this gave me an error message, but no power cycling. When I switched back to the way it's meant to be, it starts power cycling again.I've tested the sensor with my m5atom, it worked fine. I've also tested the port A on the Core S3 by setting some Pins high/low, this also works.
Is anyone experiencing the same problems with this configuration?
Cheers,
Stefan
-
sorry for pushing, but still no answer?
no one using the Core S3 with ENV3 sensor in UIflow2?
I just tested the latest version, Alpha-21... same issue. My code is just initializing the Unit and printing Temp data, thats all i want at this moment...
CoreS3 keeps power cycling until I disconnect the sensor...
-
Ports B and C wont work as the ENVIII is an I2C device and Port B is for Analog (1 output and 1 input pin) and Port C is for UART communication.
Its strange because the ENVIII was working fine with my CoreS3
-
@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 = Nonedef setup():
global label0, i2c0, env3_0, randomM5.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
-
I see you issue, you have everything in setup when it should be in loop.
You code should be like this:
-
@ajb2k3: His issue is that it hangs on the init so it never gets to the loop section, I have exactly the same issue.
@stefan-h: Did you manage to resolve this issue or is it still broken for you? I'm keen to solve my issue too!
-
Nope still hanging