Introduction: DIY an Infrared Thermometer for COVID-19 With MicroPython

Due to the outbreak of Coronavirus Disease(COVID-19), the HR of the company needs to measure and register the temperature of each worker. This is a tedious and time-consuming task for HR. So I did this project: the worker pressed the button, this instrument measured the temperature, uploaded the data onto the Internet, and HR could go online and check everyone's temperature at any time.

Step 1: Supplies


  • MakePython ESP32
  • MLX90614
  • Button
  • Battery
  • Breadboard

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


  • uPyCraft V1.1

Click this link to download uPyCraft IDE for Windows:

Step 2: Wiring

  • The VIN pin of the MLX90614 is connected to 3V3 of MakePython ESP32, GND is connected to GND, SCL pin is connected to IO22 and SDA pin is connected to IO22 of the board.
  • The VCC pin and GND pin of the button are connected to the 3V3 and GND of MakePython ESP32, and the OUT pin is connected to IO14.
  • Connect MakePython ESP8266 to PC using the USB cable.

Step 3: UPyCraft IDE

  • If you haven't used uPyCraft, you can download the MicroPython ESP32 Dev Kit Guidance document with detailed instructions.
  • You can skip this step if you've used it.

Step 4: Use ThingSpeak IoT

    Remotely monitor temperature on ThingSpeak, steps:

  1. Sign up an account in If you already have one, sign in directly.
  2. Click New Channel to create a new ThingSpeak channel.
  3. Input name, Description, Select Field 1. Then save channel on the bottom.
  4. Click the API Keys option, copy the API Key, we will use it in the program.

Step 5: Code

Download and run the, driver file.

Make the following changes to the file, then save and run.

  • Modify SSID and PSW to connect WiFi
  • Modify the API KEY that you got in the previous step

This is the code to get the temperature and upload the data:

while True:<br>    if(button.value() == 1):
      Temp = sensor.getObjCelsius()	#Get temperature information
      #Use API keys to write temperature data to a channel

Step 6: Install

Fix the board to the door with double-sided tape, open the switch on the battery, the screen will prompt WiFi connection success.

Step 7: Measure

The screen says "Measure temp Please press the button", you get as close as possible to MLX90614, then press the button, it will show your temperature and upload the data to the website.

Step 8: Complete

Go to and you can see the measurements in Private View.

This project records your temperature and measurement time, which can also be used as an attendance record. Now HR can see your data by logging into the ThingSpeak web, which is very convenient.