Linux charger and fuel gauge userland driver for 2S LiPo battery.
Designed to work with "Juice Board" module attached to Khadas Edge-V SBC.
Publishes battery info as a MQTT topic.
MQTT client code uses Eclipse C++ library paho.mqtt.cpp
- Fuel Gauge IC: CW2015C
- Charger IC: BQ25703A
- Uses Linux I2C driver (ioctl, I2C_RDWR-style)
- Requires MQTT broker, such as Mosquitto
- Requires Paho C++ MQTT library installed in default location
cd build
cmake ..
make
- easiest is to add link to
<path>/bin/juice
to /etc/rc.local file in order to launch at boot
- provided example code could be used as a basis to integrate into final application