Skip to content

rossack/mg_tank_level_monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

mg_tank_level_monitor

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.

πŸš€ Key Improvements

  • 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_root folder, the server build process then packs the files in packed_fs.c for the C server.

πŸ›  Project Structure

  • /Server: The C-based backend. Handles ADC readings, MQTT publishing, and the Mongoose web server.
  • /Webapp: The Preact + JavaScript frontend source code.

πŸ”Œ Hardware Requirements

  • 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).

πŸ“¦ Getting Started

1. Build the Frontend

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

About

PicoW project - uses a 4-20mA level sensor to monitor water tank level.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors