pisugar-3

Integrate PiSugar 3 battery hat with Raspberry Pi for I2C battery monitoring and safe shutdown.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/therebelrobot/microcontroller-base --skill pisugar-3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pisugar-3
Source: https://github.com/therebelrobot/microcontroller-base/tree/main/.roo/skills/pisugar-3
Command: npx skills add https://github.com/therebelrobot/microcontroller-base --skill pisugar-3

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The PiSugar 3 battery hat enables portable, safe Raspberry Pi power with integrated battery monitoring, wake scheduling, and a reliable shutdown workflow, so you can run Pi projects off a LiPo battery without fear of data loss or unexpected power loss.

Core Features & Use Cases

  • I2C battery monitoring at address 0x57 for real-time voltage and charge status
  • Pushbutton-powered wake/on/off control with configurable behavior
  • Safe OS shutdown with automatic power cut after shutdown using PiSugar firmware
  • Wake alarms via RTC and pisugar-server HTTP/WebSocket API for scheduled operation
  • Broad Raspberry Pi compatibility (Zero to Pi 5) for portable, headless deployments

Quick Start

Connect the PiSugar 3 to the Raspberry Pi, enable I2C, and verify battery status and safe shutdown using the pisugar-server.

Frequently Asked Questions about pisugar-3

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable safe shutdown and battery monitoring on a Raspberry Pi using a PiSugar 3 battery hat?

To enable safe shutdown and battery monitoring on a Raspberry Pi, connect the PiSugar 3 battery hat, enable the I2C interface, and use the pisugar-server to track real-time voltage and trigger automatic power cuts. This prevents data loss during portable operation.

Can I use the PiSugar 3 battery hat with a Raspberry Pi Zero or Pi 5 for portable power?

Yes, the PiSugar 3 battery hat supports broad Raspberry Pi compatibility, applying to the Zero, Zero W, Zero 2 W, 3B, 3B+, 4B, and 5 models for portable power, headless deployments, and wake-alarm powered operation.

How does I2C battery telemetry work with the PiSugar 3 on Raspberry Pi?

I2C battery telemetry works by reading real-time voltage and charge status from the PiSugar 3 battery hat at I2C address 0x57. The pisugar-server API exposes this telemetry via HTTP and WebSocket for continuous power monitoring.

How do I schedule a wake alarm on a headless Raspberry Pi powered by a LiPo battery?

You schedule a wake alarm on a headless Raspberry Pi by using the Real-Time Clock and the pisugar-server HTTP/WebSocket API. This programmable wake event triggers the PiSugar 3 to restore power and resume operation.

What is the best way to configure pushbutton control for a Raspberry Pi power management hat?

The best way to configure pushbutton control is through the PiSugar 3 firmware, which maps pushbutton inputs to wake, power on, and power off behaviors. This provides configurable, hardware-level power management without complex software scripts.

Does the PiSugar 3 automatically cut power after a Raspberry Pi OS shutdown?

Yes, the PiSugar 3 automatically cuts power after an OS shutdown. The PiSugar firmware detects the safe shutdown completion and disconnects the battery power, ensuring a reliable shutdown workflow and preventing battery drain.