Reading data from a sensor using MicroPython
Reading sensor data is an essential function of the ESP8266. You can do that using MicroPython. To demonstrate it, we are going to read the temperature and humidity from the DHT11 sensor using MicroPython.
In this tutorial, you will need an ESP8266 board, a USB cable, and a few other components, which include:
- DHT11 temperature/humidity sensor (https://www.sparkfun.com/products/10167)
- 10 kΩ resistor
- Jumper wires
Mount the ESP8266 board and the DHT11 sensor onto the breadboard. Connect a 10 kΩ pull up resistor to the DHT11 data pin and connect the pin and GND pin to the 3V pin and GND pin of the ESP8266 board, respectively. Finally, connect the data pin of the DHT11 to GPIO 5 of the ...