Introduction: MicroPython Program:Update Coronavirus Disease(COVID-19) Data in Real Time

In the past few weeks, the number of confirmed cases of coronavirus disease (COVID 19) worldwide has exceeded 100,000, and the world health organization (WHO) has declared the new coronavirus pneumonia outbreak to be a global pandemic. I was very worried about this outbreak, and I had to go online every day to check the latest outbreak data, but it was very inconvenient, so I made a project to use MakePython ESP32 to get the latest outbreak data in real-time and display it, and it was very convenient to keep it on my desk for the latest situation.

Step 1: Supplies

Device:

  • MakePython ESP32
  • lithium battery
  • USB cable
  • Toggle switch

Tool:

  • Foamboard
  • knife
  • Paper box
  • Soldering iron
  • Hot melt glue gun
  • Double-sided tape

MakePython ESP32 is an ESP32 board with an integrated SSD1306 OLED display, you can get it from this link: https://www.makerfabs.com/makepython-esp32.html

Software:

uPyCraft V1.1

Click this link to download uPyCraft IDE for Windows:https://randomnerdtutorials.com/uPyCraftWindows

Step 2: UPyCraft Direction for Use

Download the Get Started MicroPython ESP32 file, which is detailed in the MicroPython Development Tools section of the file, which will help you download and install the uPyCraft IDE and use it. It also helps you get started with MicroPython programming.

You can get the file from this link:https://www.makerfabs.com/makepython-esp32-starter ...

Step 3: Connect

  • 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 COM20 in my case. If no port appears, try downloading the USB drive: https://www.silabs.com/products/development-tools/...
  • Open uPyCraft and click: Tools ->board -> esp32,And then click: Tools -> Serial -> COM20(Your port)

Step 4: The Code Download

Download the boot.py, ssd1306.py and main.py files. Open and click DownloadAndRun to load it into MakePython ESP32.

Step 5: Modify the Code

  • Open the boot.py file and change the ssid and password to your local network name and password, so that the module can be connected to WIFI for information after power
ssid = "Makerfabs"
password = "20160704"<br>
  • If you find that your country outbreak information is not displayed, please tell me to add it, or you can modify it by yourself. The method is as follows: open the main.py file, find CountryName[], add your CountryName (need to be translated into Chinese) on it, and change the number in range() to the corresponding number of countries, and run after saving it

Step 6: Make the Mould

Next, we started to make the shell of our own mold:

Use a knife to cut a small hole in the paper box to place the toggle switch, and a long hole to put the display screen.

Step 7: Weld

The left pin of the toggle switch is welded to the power input of the MakePython ESP32 module with an electric soldering iron. The positive pole of the lithium battery is connected to the middle of the toggle switch, and the negative pole is connected to the GND of the module.

Step 8: Assembly

  • Attach the module to the foam board with double-sided adhesive tape and the lithium battery to the other side of the foam board.
  • Attach toggle switch to carton hole and fix with a hot glue gun
  • The paper cover is folded into a cardboard box, the display screen is inserted into the long cardboard box hole, and other parts are put into the cardboard box

Step 9: Complete

By flipping the switch on the carton, MakePython ESP32 connects to the Internet automatically when powered on, and the screen displays the latest outbreak data information.

Step 10: Display

Looking at the information on the screen, there are so many people infected with the coronavirus. Hope they get better soon! At the same time, we should protect ourselves, wash our hands frequently and gather less.