The Plantower sensor comes with a flat cable with alternating red and black color. I soldered a female Dupont cable to its end. The colors in the table below correspond to the colors of my Dupont cable.
Pin 1 is on the right-hand side of the connector on the sensor.
Connections:
PlanTower Pin | !WeMos bus | color of Dupont cable |
---|---|---|
1: Vcc | 5V | green |
2: GND | GND | blue |
3: set | nc | violet |
4: Rx | D2: GPIO 22 | gray |
5: Tx | D1_ GPIO 21 | white |
6: RESET | RST | black |
7: nc |
Read messages from the Plantower sensor and print them.
Write a function decoding the message.