Raspberry Pico applications for monitoring and controlling devices in my house. The code is written using Raspberry C SDK and runs directly on Raspberry Pico W without an Operating System.
- Internet connection, using the build-in WiFi module and the lwIP stack.
- Bluetooth connection to devices, using the build-in Bluetooth module.
- USB in host mode.
- NTP client for time synchronization.
- Logging to a remote rsyslog server.
- MQTT client.
- HTTP server.
- HTTP webhook client.
- Watchdog.
- External HD44780 LCD display.
- Build-in temperature sensor.
- Sonar AJ-SR04M.
- One-wire temperature sensors (Dallas DS18S20).
- Soil moisture sensor with analog and digital inputs.
- Voltronic VM III inverter, over USB using MAX communication protocol.
- DALY BMS, over Bluetooth and HLK-B40 serial interface.
- Solid State Relays.
Applications are built on top of common library, which provides basic functionality: Internet over WiFi, Bluetooth, remote logging, time synchronization, MQTT client, HTTP client and server, watchdog, USB in host mode, encrypted key-value store. All user specific parameters are defined in params.txt file which must be available at build time in the application directory. The params-example.txt file can be used as a template.
Monitors water level in an underground tank using AJ-SR04M sonar sensor and sends the data to a remote MQTT server.
Monitors Voltronic VM III inverter over USB and DALY BMS over Bluetooth and sends the data to a remote MQTT server.
Reads soil moisture sensor and controls set of SSRs using web commands and sends the data to a remote MQTT server.
- Raspberry Pico W.
- Wiring, depending on the use case.
The project uses sub-modules, so clone the repo with all sub-modules:
git clone --recurse-submodules https://github.com/tzstoyanov/herak-raspberry
Apply all mandatory patches, which are not yet released upstream. Run in the top directory:
./scripts/apply_patches.sh
- Copy params-example.txt file as
params.txt
in the application directory and modify it with your configuration. - In the
build/<application>
directory, runcmake ../../app/<applicattion>
- In the
build/<application>
directory, runmake
- Attach to your Pico W over USB and start it in the bootloader mode (hold down the BOOTSEL button).
- Copy the generated image
build/<application>/<app-name>.uf2
to your Pico W.
herak-raspberry is available under the GPLv2.0 or later license.