An upgraded Liquid Level Monitor for the Raspberry Pi Pico W. This is a complete rewrite of the original tank_level_monitor, migrating from a custom LWIP/Pico SDK stack to the Mongoose networking library for a more robust and modern IoT experience.
- Networking Stack: Now powered by Mongoose, providing a stable HTTP/WebSocket server and MQTT Client.
- Frontend: Replaced static HTML with a reactive Preact Single Page Application (SPA) powered by Vite.
- Server Build: The frontend is bundled into
web_rootfolder, the server build process then packs the files inpacked_fs.cfor the C server.
- /Server: The C-based backend. Handles ADC readings, MQTT publishing, and the Mongoose web server.
- /Webapp: The Preact + JavaScript frontend source code.
- Microcontroller: Raspberry Pi Pico W.
- Sensor: 4-20mA pressure transducer (0-5m range).
- Interface: 4-20mA to 0-3.3V converter connected to GPIO26 (ADC0).
- Reset Button: Connected to GPIO13 (long press to reset configurations).
Navigate to the Webapp folder to install dependencies and bundle the UI:
cd Webapp
npm install
npm run build
### 2. Build the Server
Using VSCode with the Raspberry Pi Pico Project extension