Page 1 of 1

Compost Monitoring with ESP8266

Posted: Sun Nov 10, 2019 8:45 am
by cristianpb
An ESP8266 measures temperature and uses the Sigfox network to send the measurements into a web server to monitor a compost pile.

Image

I used pins GPIO1 and GPIO3 to communicate with the BRKWS01 device.

Notice that pins GPIO1 and GPIO3 are used for serial communication with the USB cable and so with your PC, so serial connections like rshell or picocom won’t work. Luckily MicroPython provides WebREPL, which relies only on web socket connection, so that I could use UART0 for data transmission and still have access to the REPL console for debugging purposes.

Image

The following ESP8266 ports can be used for serial communication:
GPIO1 and GPIO3 for transmission and reception ;
GPIO2 for transmission only ;
GPIO13 and GPIO15 for transmission and reception.

MicroPython provides a UART class which implements the UART protocol for serial communication. This class is initialized using only ids 0 or 1. UART0 corresponds to ports to the serial communication of ports GPIO1 and GPIO3, while UART1 corresponds to the connection of pin GPIO2. It is not possible to initialize it to use pins GPIO13 and GPIO15. For this reason, I was forced to use GPIO1 and GPIO3 (UART0) to communicate with the BRKWS01 device.

The github code can be found here
More detailed explanation and images can be found here