UIFlow Guide
Retrieves heart rate and blood oxygen values.
from m5stack import *
from m5ui import *
from uiflow import *
import time
import hat
setScreenColor(0x111111)
hat_heartrate_0 = hat.get(hat.HEART_RATE)
hat_heartrate_0.setMode(0x03)
while True:
print(hat_heartrate_0.getHeartRate())
print(hat_heartrate_0.getSpO2())
wait(0.4)
wait_ms(2)
hat_heartrate_0.getHeartRate()
hat_heartrate_0.getIr()
hat_heartrate_0.getRed()
hat_heartrate_0.getSpO2()
hat_heartrate_0.setLedCurrent(0x00, 0x00)
hat_heartrate_0.setMode(0x02)