Hi guys, I am messing around with the LilyGo T-Watch that comes with an ESP32 and an ST7789 display. In this smartwatch, there is an axp202c Power Management Unit and I want to measure the power consumption of the watch in different modes. The axp202c is connected via I2C to the ESP32. I have written a simple script that reads the “fuel gauge” register and displays this value on a label. The function is called by lv_timer every second. That works fine.
Now I want to display the value in a meter. The meter looks great and I only have replaced the label by the meter, but now I am running into some error messages:
Traceback (most recent call last): File "lv_utils.py", line 123, in task_handler File "<stdin>", line 9, in set_value File "YAM_init.py", line 15, in get_Battery_Level File "axp202c.py", line 795, in getBattPercentage File "axp202c.py", line 420, in read_byte OSError: [Errno 19] ENODEV
If I understand this correctly, there is a problem addressing the axp202c via I2C, or am I wrong? But how can this happens, when it works for the label? Do you have any ideas? I would be very grateful for any small tip or hint. Thanks, cyr