and just as an extra example, lets say you wanted to track battery%
in the past, i purchased a MAX17043G based board
https://github.com/raspberrypi/linux/bl ... 17040.yaml
you can create a dtoverlay with compatible="maxim,max17043"; to load the relevant driver
then point it to the right i2c port, and boom, the LiPo battery now shows up in linux like any other laptop battery
back when i made this graph, device-tree wasnt as common, so i was getting the data via other meansand this is the raw voltage from that chip, with i believe a pi1 running on a usb wifi stick and a 2000mAh lipo
the chip can also produce a percentage of charge, which doesnt have those non-linear effects seen above
in the past, i purchased a MAX17043G based board
https://github.com/raspberrypi/linux/bl ... 17040.yaml
you can create a dtoverlay with compatible="maxim,max17043"; to load the relevant driver
then point it to the right i2c port, and boom, the LiPo battery now shows up in linux like any other laptop battery
back when i made this graph, device-tree wasnt as common, so i was getting the data via other meansand this is the raw voltage from that chip, with i believe a pi1 running on a usb wifi stick and a 2000mAh lipo
the chip can also produce a percentage of charge, which doesnt have those non-linear effects seen above
Statistics: Posted by cleverca22 — Mon Feb 26, 2024 5:35 am