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

7,697

10

5

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

  • Big and Small Contest

    Big and Small Contest
  • Game Design: Student Design Challenge

    Game Design: Student Design Challenge
  • Make It Bridge

    Make It Bridge

5 Comments

0
CyberSpiderPrime
CyberSpiderPrime

9 months ago

I tried this using the instructions as is, even installing Anaconda as recommended and only got errors. Mainly modules/files not found.

So I went back to Thonny, did some experimentation and came with these altered instructions:

In the following, replace [install directory] with Thonny's installation path (its usually "C:\Program Files (x86)" for most people) and [location] with the referenced file's location path, all other changes are as noted above (like port) (mine just happens to be COM7)..

"[install directory]\Thonny\python.exe" -u -m esptool --port COM7 erase_flash

"[install directory]\Thonny\python.exe" 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 "[location]\bootloader.bin" 0xf000 "[location]\phy_init_data.bin" 0x10000 "[location]\MicroPython.bin" 0x8000 "[location]\partitions_mpy.bin"

After I modified the above lines, the flashing worked great (took about 2 minutes).

I then used the code from the author's other page ( https://www.instructables.com/TTGO-color-Display-With-Micropython-TTGO-T-display/ ) to test it out. You have to be mindful of both the instructions and picture or you WILL have errors.

The one thing I would like to know is how to remove the 3 centered colored lines of "MicroPython" (appear to be cyan, magenta, and yellow in that order)? Since these are not listed in the code, it must be in the display driver. My version of LoBoris has a creation date of 9/6/2018, ESP32_LoBo_v3.2.24.


0
moumous
moumous

Question 2 years 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 2 years ago

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

0
GmanBB
GmanBB

Reply 2 years 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