Search

Micropython Program: Update The Covid-19 Data In Real Time

Photo of Maker01

Made by Maker01 / IoT

About the project

In the past few weeks, the number of confirmed cases of coronavirus disease (COVID 19) worldwide has exceeded 100,000, I'm anxious about this outbreak, so I had to go online every day to check the latest outbreak data, it was inconvenient, then I made a project to use MakePython ESP32 to get the latest data in real-time.

Items used in this project

Hardware components

MakePython ESP32 MakePython ESP32 https://www.makerfabs.com/makepython-esp32.html x 1

Story

Step 1: Supplies

Device:

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

Tool:

  • Foam board
  • 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 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
  • 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 the 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.

The original article is published on https://www.instructables.com/id/MicroPython-ProgramUpdate-Coronavirus-DiseaseCOVID/.

Schematics and circuit diagrams

Get-Started-With-MicroPython-ESP32

Code

boot.py

ssd1306.py

main.py

Credits

Leave your feedback...