/wsp_chlorine

Keeps and eye on the plant. Publishes its moistness to interwebs 🌱

Primary LanguageC++

πŸ§ͺ Chlorine monitor

πŸ“Pins

o
o TX
o RX
o
o
o GND

Connect up the GND to and VCC on the USB serial adapter. Remember RX -> TX and TX -> RX. Ensure the serial adapter is set to 3.3v.

πŸ•΅οΈβ€β™€οΈ Secrets

Don't forget to populate secrets.cpp for WIFI deedts see example.

#define SSID        ""
#define PSK         ""

Chlorine range is 0 - 4 ppm for 4-20ma. The resistor in here is about 51.6Ω. Full range of ADC is 1024 when it's getting 1 volt. This is 18.5ma so the ranged is mapped to that.

πŸ‘¨β€πŸŒΎ Uploading firmware

  1. Connect up the wires, TX -> RX and RX -> TX.
  2. Make sure the voltage on the serial adapter is 3.3v or it will fuck shit up.
  3. Before plugging it in, push both buttons on the board at once when booting to get it into bootloader mode. If that's working the little red light will stay on.
  4. Upload the firmware with the PIO command
pio run --target upload

You can see what it's doing with the serial monitor.

pio device monitor

πŸ₯£ Serial port

It might not be able to find the serial port, to see what ports are available run this:

pio device list

Which should show something that sounds like "usbserial"

/dev/cu.Bluetooth-Incoming-Port
-------------------------------
Hardware ID: n/a
Description: n/a

/dev/cu.usbserial
-------------------------------
Hardware ID: n/a
Description: n/a

πŸ”‹ Circuit

View Circuit