Sproutpy
🪴 Use a Raspberry PI Pico W to measure the soil moisture in your potted plants and store the measurements in the Sanity Content Cloud
Install / Use
/learn @bjoerge/SproutpyREADME
🪴 Sproutpy
Use a Wi-Fi enabled Raspberry PI Pico W and MicroPython to measure the soil moisture in your potted plants and store the measurements in the Sanity Content Cloud.
Read soil moisture levels for up to three capacitive moisture sensors at a configured interval and store these levels in a Sanity document.
What you'll need
- Raspberry PI Pico W (how to buy)
- Soil moisture sensor(s) (you can connect up to 3 to one Raspberry PI Pico W), for example SparkFun SEN-13322
- Various jumper wires, connectors, breadboard, etc. See this guide for an example of how to hook up a moisture sensor to a Raspberry PI Pico
Quickstart
First, make a fork of this repository to your personal GitHub account and clone it to your local computer.
Setup the Sanity Content Cloud & Content Studio
The Sanity Content Cloud offers a convenient way to store and read the sensor measurements, and the Raspberry PI Pico W will post sensor updates directly there. The Sanity Content Studio allows you to easily view and edit the sensor data stored in the Content Cloud.
- Go to https://sanity.io/get-started/create-project and get your project ID and dataset
- Copy
.env.examplein thestudio-folder to.envand replace the sample values with the project id and dataset from the previous step - Run the Content Studio locally with
npm run dev
Getting started with the Raspberry PI Pico W
Once the board and sensors are hooked up, you are ready to deploy the MicroPython app to the Raspberry PI so it can measure and send sensor measurements at regular intervals to the Sanity Content cloud.
- Install MicroPython on your Raspberry PI Pico W.
- Go to the
boardfolder and copyconfig.example.pytoconfig.pyand change the config according to your Sanity config. - Connect to the Raspberry PI and load the program onto it. There are several options here:
- Thonny
- Pyboard
- PyCharm with the MicroPython plugin
- VSCode with the MicroPython plugin
Set up the Raspberry Pico W and calibrate sensors
- Open
config.pyin theboard/folder and set thePROGRAM_MODEtosetup - Flash the device with all the files contained in the
boardfolder. Make sure you enable the REPL, so you can see logs and debug if something goes wrong. - (Optional) Open
config.pyagain and changePROGRAM_MODEtocalibrate. This will allow you to find the min/max values of the moisture sensors (make sure to have a glass of water readily available). - Flash the device again as in step 2
- Open
config.pyin theboard/folder and set thePROGRAM_MODEtoapp - Flash the device again as in step 2. The PI will now read sensor levels at the configured interval and post updates to your Sanity Content Cloud dataset.
Resources
- Getting started with the Raspberry PI Pico W
- MicroPython Raspberry Pi Pico reference
- Create a soil moisture sensor with a Raspberry Pi Pico and an LED ring
- Powering the Raspberry PI Pico from External Batteries
Images

Related Skills
docs-writer
98.9k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
334.1kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
arscontexta
2.8kClaude Code plugin that generates individualized knowledge systems from conversation. You describe how you think and work, have a conversation and get a complete second brain as markdown files you own.
docs
High-performance, modular RAG backend and "Knowledge Engine" Built with Go & Gin, featuring Git-Ops knowledge sync, pgvector semantic search, and OpenAI-compatible model support.
