Scott Hanselman Turns an Adafruit MatrixPortal M4 LED Matrix Into a Connected Blood Glucose Display
Originally built two years ago, Hanselman has made the source code for his health-monitoring display available for the first time.
Scott Hanselman has released the source code for a project to turn an Adafruit MatrixPortal M4-connected RGB LED matrix into a blood sugar readout — two years after completing the project.
"When you find a random Adafruit MatrixPortal M4 display and figure it'd be a fun project to put your blood sugar on it with CircuitPython," Hanselman writes in a Mastodon post brought to our attention by Adafruit itself, "but then you realize you did two years ago but never released the source (likely because you don't know Python and it's bad code)."
The project is designed for use with Adafruit's MatrixPortal M4, a development board with a Microchip ATSAMD51J19 processor with Arm Cortex-M4 core and an Espressif ESP32 coprocessor for Wi-Fi connectivity tailored specifically for driving RGB LED matrices. In Hanselman's case, the board is running a CircuitPython firmware which runs his program: a tool for querying and displaying blood sugar data from Nightscout.
"Nightscout (CGM [Continuous Glucose Monitoring] in the Cloud) is an open source, DIY project that allows real time access to a CGM data via personal website, smartwatch viewers, or apps and widgets available for smartphones," the project's creators explain. "Nightscout was developed by parents of children with Type 1 Diabetes and has continued to be developed, maintained, and supported by volunteers."
Nightscout is responsible for the communication with the continuous glucose monitor itself, which helps to simplify Hanselman's project considerably: all his CircuitPython code has to do is query Nightscout to retrieve the latest reading and format it for display on the screen, providing at-a-glance monitoring of blood sugar levels.
Hanselman's source code is available on GitHub under the permissive MIT license for anyone wanting to do the same.