Tag Archives: ESP32

Reading a photoresistor on ESP32 with MicroPython

A photoresistor or a light-dependent resistor (LDR) is a resistor that changes its value (resistance) depending on light intensity. More precisely, when light falls upon it, the resistance decreases. It is normally used as a light or dark detector. For example, it may be used in a circuit that turns lights in a room on when it gets dark. Let’s see how we use a photoresistor with ESP32 and MicroPython.

ESP32 and photoresistor
by Alena Penkova
Continue reading

Measuring CO2 with MH-Z19B on ESP32 with MicroPython

In the previous posts, I described a simple weather station that measures temperature and humidity and sends the measurements to a Google sheet. The system is supposed to be used at home. Therefore, one of the next possible improvements can be measuring air quality in a room. That can be done, for example, by adding an MH-Z19B sensor for measuring CO2 level. We’ll use again a ESP32 board and MicroPython.

Measuring CO2 with MH-Z19B sensor on ESP32
Continue reading

Weather station based on ESP32 and MicroPython

In one of the previous posts I briefly described sending data to Google Sheets from a ESP32 board using MicroPython. As I mentioned earlier, the code is available on GitHub. Here are the main features:

  1. Measuring temperature and humidity with a DHT22 sensor.
  2. Sending data to a Google Sheet.
  3. Authentication via Google OAuth 2.0 service to get access to the sheet.
  4. Configuring the device via a web browser.

The Google Sheet doesn’t need to be publicly available on the Internet. The device doesn’t require any middleman such as PushingBox or IFTTT.

In this post, let’s focus a bit on technical details.

ESP32 board and DHT22 sensor
Continue reading

MicroPython on ESP32: sending data to Google Sheets

On a wonderful weekend in summer time, instead of going out to a beach or somewhere else, I was staying at home and wondering if it’s possible to send data from an ESP board to a Google sheet using my favorite MicroPython. Let’s say it can send temperature and humidity measured by a DHT22 sensor. That’s how the project started.

(this post contains a brief description of the project, more technical details can be found in the next post)

ESP32 development board and DHT22 sensor: sending data to a Google sheet.
Continue reading