• PiSugar2 (Pro)
  • Introduction
  • I2c tools
  • Disclaimer
  • Model PiSugar2 (IP5209)
  • Read voltage
  • Custom Push Button
  • Step 1 – Set register 0x51 to GPIO1
  • Step 2 – Set GPIO1 in register 0x53 to enabled
  • Step 3 – Read the value from register 0x55
  • Charging control
  • Step 1 – Set 0x51 register to GPIO2
  • Step 2 – Set GPIO2 in register 0x54 to disabled
  • Step 3 – Set register 0x55 to enable/disable charging.
  • Step 4 – Set GPIO2 in register 0x54 to enabled
  • Detect charging status
  • Step 1 – Set Vset to internal register
  • Step 2 – Set function of Vset to GPIO4
  • Step 3 – Set register 0x53 to enable/disable charging.
  • Step 4 – Read GPIO4 in register 0x55 to enabled
  • Model PiSugar2Pro (IP5312)
  • Read voltage
  • Custom Push Button
  • Step 1 – Set register 0x52 to GPIO1
  • Step 2 – Set GPIO1 in register 0x54 to enabled
  • Step 3 – Read the value from register 0x58
  • Charging control
  • Step 1 – Set 0x52 register to GPIO2
  • Step 2 – Set GPIO2 in register 0x56 to disabled
  • Step 3 – Set register 0x58 to enable/disable charging.
  • Step 4 – Set GPIO2 in register 0x54 to enabled
  • Detect charging status
  • Step 1 – Set Vset to internal register
  • Step 2 – Set function of Vset to ADC
  • Step 3 – Set VGPI register in 0xC2 to enabled.
  • Step 4 – Read registers 0xdc and 0xdd
  • Open-Source libraries
  • pwnagotchi: