MicroPython code for the Pico Enviro+ Pack from Pimoroni
MIT License
This is the MicroPython code that I'm running on the Pico Enviro+ Pack from Pimoroni.
My Enviro+ sits on top of a Pico W. I wanted it to show the text display of the current environmental parameters, and also to publish the information to my MQTT broker at the same time. The sample code from Pimoroni is either/or, so, this repository contains an unholy mashup of a couple of chunks of their code, until I get around to doing something better.
Rather than using the full Enviro self-provisioning code from the standalone products, this is using a lightly-modified version of the network_manager
code from Pimoroni as well.
In addition, I thought I'd noodle around with using the vector-ish Hershey fonts instead of using the bitmap ones, which gave me a chance to tinker with PicoGraphics. I'm happy with the result!
I also modified the network code to enable setting the device name (new in MicroPython 1.20).
config.py.example
in Thonny to add your wifi details (and save it as config.py
when you're done). You'll also need to add MQTT details in there.micropython-mqtt.simple
using Thonny's 'Tools' > 'Manage Packages' (or using mip
- to be documented)config.py
, main.py
, network_manager.py
and the lib
directory to your Pico.mip.install("https://raw.githubusercontent.com/pimoroni/pms5003-micropython/main/package.json")
Tested / running on MicroPython 1.20[.1]
Now if you'll excuse me, I'm off to design 3D printed cases for Pimoroni products...
MIT (which matches the original Pimoroni code this is derived from)