Introduction: MicroPython Program:Mini Weather Station

It's winter now, but it still feels a little hot, even though I'm only wearing a T-shirt, which makes me want to know the current temperature, so I use the Micropython ESP32 and DHT11 sensors and a simple weather station so you can get the current temperature and humidity in any browser, now I'll share the process with you.

Step 1: Supplies


  • MakePython ESP32
  • DHT11
  • Bread board
  • Jump line
  • USB cable

MakePython ESP32 is an ESP32 board with an integrated SSD1306 OLED display, you can get it from this link:


uPyCraft IDE

Click this link to download uPyCraft IDE for Windows:

Step 2: Wiring

  1. MakePython ESP32 and DHT11 are plugged into the breadboard.

  2. DHT11 only needs 3 wires, VCC and GND are connected to 3V3 and GND of ESP32, and DATA is connected to IO14 of ESP32. I used GPIO14 in the experiment, so I connected IO14.

  3. Connect MakePython ESP32 to PC using a USB cable, Open device manager (Simply search for "device" in the Windows search box). When expanded, the port section should display something like the above. Make a note of the port number, such as COM19 in my case. If no port appears, try downloading the USB drive:

Step 3: UPyCraft Direction for Use

Detailed instructions for uPyCraft can be found at this link:

  • Click the link above to open the page
  • Find the MicroPython ESP32 Dev Kit Guidance document
  • Click download to open the document
  • Detailed tutorials are available in the I. MicroPython Development Tools directory

Of course, this documentation is not just about the uPyCraft instructions, but also includes some MicroPython ESP32 routines and frequently asked questions and error handling.

Step 4: The Code Download

The code for was downloaded from the GitHub repository: Or download mine.

After downloading, open the file, and click Save and DownAndRun. "download ok" will be displayed when the download is successful.

After downloading, the following changes need to be made:

1. Change network name and password:

  • SSID: need to change to your local network name
  • PASSWORD: need to change to your local network password

When you're done, click DownAndRun and the MakePython ESP32 connects to WiFi

2. DHT11 data pin:

  • If DHT11 receives a Pin change on MakePython ESP32, change the number in the Pin() to the Pin you are receiving.

Step 5: Get IP Address

Run, network success, you can see an IP address (mine:

Step 6: Open a Browser

Open the browser on your PC, type in the IP address you just got (, and click Enter to confirm.

Step 7: Now the Weather

The browser displays the current temperature and humidity, as well as the OLED display on MakePython ESP32. When you refresh the page, the temperature and humidity data will also refresh.

The mini weather station is relatively simple. I will add data from gas sensors, rain sensors, atmospheric pressure sensors and other sensors to enrich the weather station.