UIFlow Guide
from m5stack import *
from m5ui import *
from uiflow import *
import time
import unit
setScreenColor(0x222222)
miniscales_0 = unit.get(unit.MINISCALE, unit.PORTA)
miniscales_0.setLed(255, 0, 0)
while True:
print((str('weight:') + str(((str((miniscales_0.weight)) + str('g'))))))
print((str('button status:') + str((miniscales_0.button))))
wait(1)
wait_ms(2)
miniscales_0.calibration(0, adc0, 100, adc1)
print(miniscales_0.adc)
print(miniscales_0.getAverageFilterLevel())
print(miniscales_0.button)
print(miniscales_0.getEMAFilterAlpha())
print(miniscales_0.getLowPassFilter())
print(miniscales_0.weight)
miniscales_0.reset()
miniscales_0.setAverageFilterLevel(0)
miniscales_0.setEMAFilterAlpha(0)
miniscales_0.setLed(255, 0, 0)
miniscales_0.setLowPassFilter(True)