This project uses a Raspberry Pi Pico W and a Waveshare 2" IPS screen to display glucose levels from the Freestyle Libre continuous glucose monitor (CGM). The project is built using CircuitPython.
This project provides a simple and effective way to continuously monitor and display glucose levels from the Freestyle Libre CGM on a small IPS screen using a Raspberry Pi Pico W. The project is written in CircuitPython, making it easy to modify and extend.
Adafruit CircuitPython Libraries
adafruit_imageload
- Folderadafruit_display_text
- Folderadafruit_requests.mpy
adafruit_connection_manager.mpy
adafruit_st7789.mpy
Install CircuitPython: Follow the instructions on the CircuitPython website to install CircuitPython on your Raspberry Pi Pico W.
Install Required Libraries: Download the required libraries from the CircuitPython library bundle and copy them to the lib
folder on your Pico W's CIRCUITPY drive:
adafruit_imageload
- Folderadafruit_display_text
- Folderadafruit_requests.mpy
adafruit_connection_manager.mpy
adafruit_st7789.mpy
Clone this Repository: Clone this repository to your local machine and copy the contents to the CIRCUITPY drive.
Configure Wi-Fi: Rename settings.toml.example
to settings.toml
on the CIRCUITPY drive (if not there already) and update it with your Wi-Fi credentials and Freestyle LibreLinkUp account details:
CIRCUITPY_WIFI_SSID = "WIFI_SSID"
CIRCUITPY_WIFI_PASSWORD = "WIFI_PASSWORD"
API_USER = "LINKUP_USERNAME"
API_PASSWORD = "LINKUP_PASSWORD"
This repository includes a Makefile that automates the installation and setup process, at the moment it only supports macOS. The Makefile is designed for experienced users who are familiar with command-line tools.
make all
: Runs all the steps to install CircuitPython, required libraries, configure settings, and deploy the code.make download_circuitpython
: Downloads the latest version of CircuitPython for Raspberry Pi Pico W.make install_circuitpython
: Waits for the RPI-RP2
drive to be mounted and installs CircuitPython.make download_libraries
: Downloads the latest compatible Adafruit CircuitPython libraries based on the installed version of CircuitPython.make install_libraries
: Installs the required libraries to the CIRCUITPY
drive.make configure_settings
: Configures Wi-Fi and LibreLinkUp credentials in settings.toml
. If the file already exists, it will not be overwritten.make deploy_code
: Deploys the project code and assets to the CIRCUITPY
drive.make clean
: Removes downloaded files and temporary data but does not delete settings.toml
.make serialconsol
: Open a serialconsol with screen to the Pi Pico W.check_mount
task that verifies if the CIRCUITPY
drive is mounted. It waits for up to 5 seconds, checking every second. If the drive is not found, the process will fail.df
and grep
to check if drives are mounted. Ensure that these commands work correctly on your system.After completing the setup instructions, your Raspberry Pi Pico W should automatically connect to your Wi-Fi network, fetch glucose data from the Freestyle Libre CGM, and display it on the Waveshare 2" IPS screen.
Contributions are welcome! Please fork this repository and submit pull requests for any enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for more details.