Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.74 KB

README.md

File metadata and controls

41 lines (28 loc) · 1.74 KB

Pi Pico

Flink Home v0.0.1

This folder contains all the code necessary to run the CO2 monitor and send data to an MQTT broker.

Components

The components I'm using in this project are as follows. All of these can be found quite easily online for purchase.

Packages & Dependencies

NB: This assumes you are using the same sensor & OLED display as I am in this project. If you are using somethign different, you will have to modify the code accordingly.

To connect the pico and test this project, I used Thonny. Some of the below packages you may be able to install directly from Thonny, however if not you should be able to install them via the python REPL.

  • ssd1306 - Micropython Package
  • upip - Micropython Package
  • micropython-umqtt.simple - Simple MQTT Client
  • micropython-umqtt.robust - Robust MQTT Client

From the Python REPL, enable and connect to wifi, and install the following package.

import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect(ssid, password)

import upip
upip.install('micropython-umqtt.simple', '/lib')
upip.install('micropython-umqtt.robust', '/lib')

After installing these you can copy the contents of main.py onto your own pico and run it.