UIFlow Guide
Output heart rate and blood oxygen data
from m5stack import *
from m5ui import *
from uiflow import *
import time
import unit
setScreenColor(0x222222)
heart_0 = unit.get(unit.HEART, unit.PORTA)
heart_0.setLedCurrent(0x04, 0x01)
heart_0.setMode(0x03)
while True:
print((str('heart rate:') + str((heart_0.getHeartRate()))))
print((str('spo2') + str((heart_0.getSpO2()))))
wait(0.3)
wait_ms(2)
print(heart_0.getHeartRate())
print(heart_0.getSpO2())
heart_0.setLedCurrent(0x00, 0x00)
heart_0.setMode(0x02)