2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub .. BatteryIcons add more PNGs Install Bump version to 1.2 Source Add version file Test Created a main changelog README.md Added API reference 9 months ago 7 days ago 10 hours ago 18 days ago 4 days ago README.
/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub ./pckg-pijuice.sh --light Note: You will need python-stdeb, dh-systemd and debhelper in order to be able to build. GUI Menus We have also taken a LOT of screenshots of all the different menu options etc to show you the full software. So lets get stuck in: We have compiled the source code into a .deb Debian package file so it is super easy to install.
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub You can also right click on this icon to load the configuration menu, instead of having to go to the menu as in the previous image. PiJuice Settings Main software menu, with no battery attached This picture is how the PiJuice Settings software looks when it loads up. This also shows some basic information about the battery charge, battery voltage, and where it is charging from....
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub This screenshot shows the same menu as in the previous screenshot, the only difference being there is now a battery installed in the PiJuice. Wakeup Alarm Menu In this screenshot we have moved over to the Wakeup alarm tab of the config menu and as you can see this is an area where you can set schedules for the Pi to automatically wake up. This is useful for remote monitoring applications.
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub Here we have the system task menu tab. This enables you to set the external watchdog timer - useful for remote applications where you can't come and do a hard-reset yourself if the Pi crashes or hangs. The PiJuice essentially monitors for a "heart beat" from the software - if it does not sense it after a defined period of time it automatically resets the Raspberry Pi.
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub This is the user scripts menu tab as we mentioned in the above screenshot description where you can add paths to custom scripts that you can trigger on events. User scripts can be assigned to user functions called by system task when configured event arise. This should be nonblocking callback function that implements customized system functions or event logging.
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub In the first config menu screenshot, we mentioned a button in the image that said "Configure HAT" - if you were to click on that button it would bring you to this PiJuice HAT general configuration menu.
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub Next we have the buttons menu - this configures the actions of the buttons on the PiJuice HAT (there are three surface mount buttons, one of which also has a 2 pin 2.54mm header so you can break out a button on a cable to the edge of a case or wherever you fancy).
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub PiJuice HAT Config LEDs Menu Perhaps our favourite options menu is the LEDs menu - as with the buttons we have made these super versatile. They can have standard functions as displayed above, they can have preset functions or you can define custom ways for them to behave. Each LED can be assigned to predefined predefined function or configured for user software control as User LED. CHARGE STATUS.
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub The battery menu is a very important one. It basically allows you to set charge profiles for the PiJuice charge chip in order to correctly and efficiently charge the battery, correctly monitor the charge percentages and more. We have got a number of built in presets such as the ones that will come with the PiJuice by default (the BP7X) and all of the other ones we will supply.
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub This Tab provides configuration of two pins IO port provided from HAC microcontroller at P3 Header. Modes selection box provides to program IO pin to one of predefined modes: NOT_USED: Set IO pin in neutral configuration (passive input). ANALOG_IN: Set IO pin in analog to digital converter mode. In this mode Value can be read with status function GetIoAnalogInput(). Pull has no effect in this mode.
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub Last but very much not least is the firmware menu.
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub }, "low_charge": { "function": "NO_FUNC", "enabled": true }, "button_power_off": { "function": "USER_FUNC1", "enabled": true }, "forced_power_off": { "function": "USER_FUNC2", "enabled": true }, "no_power": { "function": "SYS_FUNC_HALT_POW_OFF", "enabled": true }, "forced_sys_power_off": { "function": "USER_FUNC3", "enabled": true }, "watchdog_reset": { "function": "USER_EVENT", "enabled": true } }, "user_functions": { "USER_FUNC8": "", "USER
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub SYS_FUNC_HALT SYS_FUNC_HALT_POW_OFF SYS_FUNC_HALT_POW_OFF SYS_FUNC_REBOOT USER_EVENT USER_FUNC1 .. USER_FUNC15 button_power_off, forced_power_off, forced_sys_power_off, watchdog_reset enabled: true, false function: NO_FUNC USER_EVENT USER_FUNC1 .. USER_FUNC15 system_task: enabled: true, false watchdog enabled: true, false period (minutes): 1..65535 min_bat_voltage enabled: true, false threshold (%): 0..
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub starts with one byte command code, followed by data payload and with checksum byte at the end of message. Checksum is 8-bit XOR calculated over all data payload bytes. Command Abstraction Layer In order to facilitate communication with PiJuice HAT using I2C Command API there is abstraction layer hat encapsulates commands into more intuitive interface to configure, control and retrieve status of PiJuice features.
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub print pijuice.status.GetStatus() Returns: {'data': {'battery': 'CHARGING_FROM_5V_IO', 'powerInput5vIo': 'PRESENT', 'isFault': False, 'isButton': False, 'powerInput': 'NOT_PRESENT'}, 'error': 'NO_ERROR'} GetChargeLevel() Gets current charge level percentage. Returns: 'data':charge_level Where charge_level is percentage of charge, [0 - 100]%. Example: print pijuice.status.
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub print pijuice.status.GetLedBlink('D2') Returns: {'data': {'count': 10, 'period2': 500, 'rgb2': [100, 0, 0], 'rgb1': [0, 200, 100], 'period1': 1000}, 'error': 'NO_ERROR'} GetIoDigitalInput(pin) Gets state at IO pin configured as digital input. Arguments: pin: IO pin designator, 1 for IO1, 2 for IO2. Returns: 'data':input_state Where input_state is 0 for low input state, 1 for high. Example: print pijuice.status.
2/12/2018 PiJuice/Software at master · PiSupply/PiJuice · GitHub print pijuice.power.GetSystemPowerSwitch() Returns: {'data': 500, 'error': 'NO_ERROR'} https://github.