Error DHT12 M5stack CORE
-
unexpected keyword argument freq
M5stack CORE

UI 1,4,5
from m5stack import *
from m5ui import *
from uiflow import *
import i2c_bussetScreenColor(0x222222)
label0 = M5TextBox(85, 57, "Text", lcd.FONT_DejaVu40,0xFFFFFF, rotate=0)
label1 = M5TextBox(83, 145, "Text", lcd.FONT_DejaVu40,0xFFFFFF, rotate=0)
label2 = M5TextBox(215, 146, "C", lcd.FONT_DejaVu40,0xFFFFFF, rotate=0)
label3 = M5TextBox(215, 57, "%", lcd.FONT_DejaVu40,0xFFFFFF, rotate=0)
label4 = M5TextBox(250, 135, "O", lcd.FONT_Default,0xFFFFFF, rotate=0)hum_Integer = None
hum_decimal = None
tem_Integer = None
tem_decimal = Nonei2c0 = i2c_bus.easyI2C(i2c_bus.PORTA, 0x5C)
while True:
wait_ms(100)
hum_Integer = int(((i2c0.read_u16(0x00, byteorder="big")) / 256))
wait_ms(100)
hum_decimal = ((i2c0.read_u16(0x00, byteorder="big")) % 256) * 0.1
wait_ms(100)
label0.setText(str(hum_Integer + hum_decimal))
wait_ms(100)
tem_Integer = int(((i2c0.read_u16(0x02, byteorder="big")) / 256))
wait_ms(100)
tem_decimal = ((i2c0.read_u16(0x02, byteorder="big")) % 256) * 0.1
wait_ms(100)
label1.setText(str(tem_Integer + tem_decimal))
wait_ms(2)
I2c Bus error 6Thanks
-
Hello @chetosvsgeez
Have you considered using the latest UI 1.7.2? Your code runs fine here on a M5Stack Gray and UI 1.7.2.
BTW: if you enclose your code with ``` on a new line before and after the code, the code becomes much more readable. For example:
from m5Stack import *Thanks
Felix
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login