Installing Loboris (lobo) Micropython on ESP32 With Windows 10 [easy]

2,140

5

4

Introduction: Installing Loboris (lobo) Micropython on ESP32 With Windows 10 [easy]

This guide will help you to install loboris micropython on your ESP32 without any further knowledge.

Loboris has librarys which the standard micropython hasn't and which are quite usefull. This guide is especially made for my tutorial on how to use a st7789v tft display with micropython [coming soon]

Step 1: Installing Software

We need Software to install micropython. We start with python. If you haven't already installed it I recommand you to install Anaconda (anaconda.com), which is a package with python, libarys and useful tools. Just install it with standard options.

Then you need also the esp-tool, which we need to flash the firmware. Download the whole folder from https://github.com/espressif/esptool and unzip it in a new folder

Step 2: Download Firmware

Download the latest firmware from

https://github.com/loboris/MicroPython_ESP32_psRAM...

These are prebuilt firmwares, which makes it a lot easier. You can either download the normal built "MicroPython_LoBo_esp32" or the built with all librarys "MicroPython_LoBo_esp32_all". If you came here from my esp32 tft display tutorial you have to download the "MicroPython_LoBo_esp32_all"

Scroll down on the website and download the .zip file.

Open the zip file and copy all the files and the folder. Paste them into the folder of the esptool (from step 1). Don't put them in a subfolder! The bin files (micropython.bin etc.) must be in the same folder as the .py files (esptool.py etc.). Only the bootloader.bin must be in the subfolder bootloader.bin (See photo for structure)

Step 3: Find the COM Port

Connect your esp32 via USB. Open the Windows device manager (via the Windows setting or press Windows-Key + R, write "devmgmt.msc" and press enter). Open the point "ports". Look for something like "cp2102". Behind there is the COM port specified, for example COM7. Keep this in mind for the next step.

Step 4: Flash the Firmware

I assume you followed my tutorial and installed anaconda. If you have a different python installation I assume you can adapt the following yourself.

Open the "Anaconda prompt" (Click Windows startmenu -> Anaconda). Change the path to the folder your esp tool is located at. For me this would be "C:\Users\Marc\Desktop\TTGO Display\esptool-master2"

To change to this folder type "cd C:\Users\Marc\Desktop\TTGO Display\esptool-master2" and press enter.

Now we flash the firmware. Make sure your esp32 is connected. Enter the following command:

python esptool.py --chip esp32 --port COM7 --baud 460800 --before default_reset --after no_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader/bootloader.bin 0xf000 phy_init_data.bin 0x10000 MicroPython.bin 0x8000 partitions_mpy.bin

Change the COM port to the port you found in previous step and press enter. The firmware now gets flashed. This may takes a minute.

Step 5: Test If the Firmware Was Flashed Sucessfully

I recommand you to use uPyCraft. (http://docs.dfrobot.com/upycraft/) Download and install it. Open the programm. Click tools -> board -> esp32. Click tools -> Serial -> (Select the Serial on which your board is connected, COM7 in my case).

If the flashing was sucessful you should see ">>>" in the terminal. You can type "1+1" and press enter, and it should return 2. If you see instead a window with options to flash a firmware, the installation might failed somewhere. (Sometimes this occures also when the installation succeded. When you see the "flash window", try to connect a few times again, disconnect the USB from the board, close uPyCraft, connect the board again, open uPyCraft, and try to connect a few times again. Sometimes this works, sometimes uPyCraft ALWAYS fails at the first try but succed with the second connection try).

2 People Made This Project!

Recommendations

  • Battery Powered Contest

    Battery Powered Contest
  • Plywood Challenge

    Plywood Challenge
  • Plastic Contest

    Plastic Contest

4 Discussions

0
moumous
moumous

Question 7 months ago on Step 4

when i write this instruction
python esptool.py --chip esp32 --port COM8 --baud 460800 --before default_reset --after no_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 bootloader/bootloader.bin 0xf000 phy_init_data.bin 0x10000 MicroPython.bin 0x8000 partitions_mpy.bin


it gives this error message
No such file or directory: 'bootloader/bootloader.bin'

what can i do

0
GmanBB
GmanBB

Answer 4 months ago

Go to random nerd tutorials and look for micropython. Try another firmware. Come back, try again

0
GmanBB
GmanBB

Reply 4 months ago

Got same message before. Dont use your command line. Go to directory you saved firmware. Open flash.sh file with text editor and change port to COM8 (I assume your port is correct) run ./flash.sh from directory your files are in. I struggle two days till I find out this. my example: 1)downloaded drivers to mac's desktop. cd /Users/raimis/"you driver folder name"/ 2) ./flash.sh (hit enter)
If your port is right install will begin