Raspberry Pi Setup - Digital-Waters/WaterMonitorDevice GitHub Wiki

Start here if you got a brand new Raspberry Pi Zero 2 W (RPi for short, our officially supported board). Or if you'd like to fully reset your board to our official configuration, this page has all you need to know.

Tools Needed

Parts Needed

  • Raspberry Pi Zero 2 W
  • Micro SD card. At least 64gb total capacity. WARNING: IT WILL BE FORMATTED
  • Wifi

Instructions

  1. Download the official Raspberry Pi OS Imager software if you don't already have it.
  2. Select the latest stable / legacy OS (Bullseye), your target device (RPi Zero 2 W), and your SD card (in your SD card reader, connected to your computer). rpi os imager1
  3. Apply OS customization settings, including wifi access info so that your device will automatically connect to your wifi and be immediately accessible to you via SSH. USE YOUR PHONE HOTSPOT AS THE WIFI NETWORK THE DEVICE CONNECTS TO rpi os imager2 rpi os imager3
  4. Create the OS image on the SD card.
  5. Insert newly formatted SD card in target Raspberry Pi device, boot up device.
  6. Once booted, connect via SSH using the RPi hostname, and then the username and password you set in step 3. putty
  7. Ensure system is fully updated before we put our Digital Waters software on it. Once logged into your RPi via SSH, from the command line interface (CLI), run: sudo apt-get update To download the latest libraries. Then: sudo apt-get upgrade To upgraded the local libraries.
  8. Confirm your OS version. From the CLI, type cat /etc/os-release Ensure you have version 11 (bullseye)

You have a fully updated and stable Raspberry Pi that is ready to be setup with Digital Waters hardware sensors and software.

Connecting Sensors / Probes

Once your rpi is setup, let's connect some sensors to it, install any required software, and make configuration changes.

  1. Setup your temperature sensor by following these steps..
  2. Setup the camera and LEDs to provide lighting.

Running Our Software

To run our software without errors, you'll need to install some libraries. run the following commands:

  • Tools and Utilities our apps use need to be installed:
pip install pynmea2
pip install pytz
pip install requests-toolbelt

sudo apt-get install python3 python3-pip
pip3 install requests requests-toolbelt
  • create a folder in your home directory, copy our source files into it. E.g.: /home/username/dw/
  • Run our monitoring software from the CLI with python mainloop.py
  • Test to ensure the app runs without errors. Once it's running properly, create a service to auto-run our app on system startup.

And that's it! The water monitor software should now be running on your rpi automatically on startup and use the camera and temperature sensor to collect accurate information about the water quality :D