A project that uses CircuitPython and reads glucose values from Nigthscout and display them in an RGB LED matrix
- Display the last SGV value from nighscout on the RGB LED Matrix
- Progress bar to show next update
- Show one digit precision for values between 0.0 and 19.9
- Customized "1" so it looks nice when 3 digits are shown
- Colorized value depending on configurable urgent, warning or in range values
- NTP sync to get time and turn off the screen during night hours
- Strikethrough SGV when value is stale
- The code always convert the glucose value to mmol/L (and assumes the value comes as mg/dL)
- The code does not handle specific errors for now
- Off hours cannot break over the day, they must start at a minimum at 0
- There are console messages than can be removed to optimize memory usage
Configuration and dependencies from adafruit-circuitpython-bundle-8.x-mpy-20230211
see https://github.com/adafruit/circuitpython
- font5x8.bin
- lib/adafruit_led_animation/*
- lib/adafruit_datetime
- lib/adafruit_framebuf
- lib/adafruit_ntp
- lib/adafruit_pixel_framebuf
- lib/adafruit_requests
- lib/neopixel
- Raspberry Pi Pico W see https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html
- Waveshare 16x10 RGB LED HAT for Raspberry Pi Pico see https://www.waveshare.com/pico-rgb-led.htm
- Set your <<YOUR_WIFI_NAME>> and <<YOUR_WIFI_PASSWORD>> on the
settings.toml
file - Set yout <<YOUR_NIGHTSCOUT_BASE_DOMAIN>> and <<YOUR_NIGHTSCOUT_API_TOKEN>> on the
settings.toml
file - (Optional) If your nightscout does not requires a token for the api you can remove the
&token=" + os.getenv("NIGHTSCOUT_TOKEN")
on thecode.py
when setting theNIGHTSCOUT_URL
constant (for creating an api token, please see https://nightscout.github.io/nightscout/security/)