Giter Club home page Giter Club logo

pwnagotchi-plugin-pisugar3's Introduction

Improved PiSugar 3 Plugin For Pwnagotchi

The PiSugar 3 Plugin displays the battery percentage as well as the charging status on your Pwnagotchi's UI.

Improvements

-This plugin introduces a smoothing mechanism for the battery readings. It calculates a smoothed average based on a sample size of battery readings, resulting in a more stable and accurate battery percentage display.

-The UI has also been simplified, showing only the battery percentage. The voltage as well as the tempature readout have been removed.

-Battery status will automatically change from "BAT" to "CHG", when plugged into a charger.


Screenshot 2023-07-04 at 1 57 00 PM Screenshot 2023-07-04 at 1 55 46 PM

Requirements

  • Supports PiSugar 3 Only!
  • I2C interface Enabled
  • PiSugar Power Manager
  • Custom plugins enabled and directory configured

PiSugar3 Plugin Installation

To install the PiSugar3 plugin and configure the PiSugar3 UPS module, follow these steps:

Enable the I2C interface and configure PiSugar3

Enable the I2C interface by running the following command:

sudo raspi-config

Select "Interfacing Options," then "I2C," and choose "Yes" to enable the I2C interface.

Detect the I2C bus and devices by running the following commands:

i2cdetect -y 1
i2cdump -y 1 0x32
i2cdump -y 1 0x75

Install the PiSugar Power Manager

Run the following command to install the PiSugar Power Manager:

curl http://cdn.pisugar.com/release/pisugar-power-manager.sh | sudo bash

Create the custom plugins directory

If the custom plugins directory doesn't already exist, create it by running the following command:

mkdir /etc/pwnagotchi/custom-plugins

Download the plugin

Navigate to the custom plugins directory:

cd /etc/pwnagotchi/custom-plugins

Clone the PiSugar3 plugin repository:

git clone https://github.com/nullm0ose/pwnagotchi-plugin-pisugar3.git

Copy the plugin file

Copy the pisugar3.py file to the custom plugins directory:

cp /etc/pwnagotchi/custom-plugins/pwnagotchi-plugin-pisugar3/pisugar3.py /etc/pwnagotchi/custom-plugins

Add the plugin configuration

Add the following lines config.toml:

main.plugins.pisugar3.enabled = true
main.plugins.pisugar3.shutdown = 5

Adjust the shutdown value to the desired battery percentage at which the pwnagotchi should shut down.

Restart your Pwnagotchi

Restart your Pwnagotchi for the changes to take effect:

systemctl restart pwnagotchi

pwnagotchi-plugin-pisugar3's People

Contributors

nullm0ose avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.