Skip to content

Instantly share code, notes, and snippets.

View juanfont's full-sized avatar
💭
🇪🇺

Juan Font juanfont

💭
🇪🇺
  • European Space Agency
  • Leiden, Netherlands
View GitHub Profile
@juanfont
juanfont / run.py
Created March 22, 2021 18:30
PiJuice Prometheus Exporter
from pijuice import PiJuice
from prometheus_client import start_http_server, Gauge
import time
pj = PiJuice(1, 0x14)
battery_current = Gauge('pijuice_battery_current', 'Battery current')
charge_level = Gauge('pijuice_charge_level', 'Charge level')
battery_temperature = Gauge(
### Keybase proof
I hereby claim:
* I am juanfont on github.
* I am juanfont (https://keybase.io/juanfont) on keybase.
* I have a public key ASA__s7YYbIZxL0gW-IALft6C4VGkFmEavlk7ODBdur46Qo
To claim this, I am signing this object: