Put MicroPython on Windows to run ESP32 on Python

The ESP32 comes with arduino-based firmware from the beginning. Change the firmware so that you can write this in Python.

MicroPython reference https://micropython-docs-ja.readthedocs.io/ja/latest/esp32/tutorial/intro.html#powering-the-board

Install esptool.py using pip from the command prompt.

Preparation for inserting micropython. pip install esptool

Erase the flash of esp from the installed esptool.

On the reference page esptool.py --port /dev/ttyUSB0 erase_flash The command was written, but an error occurred here. For Windows, the port name is different. When I looked at the port connecting the ESP32 from the device manager, it was COM5, so I tried to pass it here. I was confused because the way to specify the port number is different from Linux / mac.

esptool.py --port COM5 erase_flash

Next, insert the firmware

This is also the original command

esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash -z 0x1000 esp32-20180511-v1.9.4.bin

There was a description. If you go to see the firmware of Micropython's ESP32, there are various things. I downloaded the latest version at the top of GENERIC's non-unstable stuff. (What is written as esp32-idf3-20191220-v1.12.bin) https://micropython.org/download/esp32/ image.png

Move to the download folder at the command prompt. cd Download

Insert the downloaded firmware. esptool.py --chip esp32 --port COM5 write_flash -z 0x1000 esp32-idf3-20191220-v1.12.bin (Rewrite port to the current port and 0X1000 or later to the downloaded firmware.) ---- If you just get out and stop at connecting, press the BOOT button on the ESP32 main unit to proceed with the installation.

You have now installed MicroPython.

I referred to this for the transfer of the Python source code. https://qiita.com/moomooya/items/ea30fe1113b21ebc9329#ソースコードの転送

Reference article

How to get started with MicroPython on the ESP32 https://micropython-docs-ja.readthedocs.io/ja/latest/esp32/tutorial/intro.html#powering-the-board

A guidebook for doing IoT with MicroPython easily to the last minute https://qiita.com/moomooya/items/ea30fe1113b21ebc9329

Recommended Posts

Put MicroPython on Windows to run ESP32 on Python
Run servo with Python on ESP32 (Windows)
Run Openpose on Python (Windows)
Python 3.6 on Windows ... and to Xamarin.
Python on Windows
[Kivy] How to install Kivy on Windows [Python]
Install and run Python3.5 + NumPy + SciPy on Windows 10
Put Cabocha 0.68 on Windows and try to analyze the dependency with Python
How to run MeCab on Ubuntu 18.04 LTS Python
python basic on windows ②
Install python on windows
[Python] How to install OpenCV on Anaconda [Windows]
Run Python on Apache to view InfluxDB data
How to embed mod_wsgi into Apache on Python Windows
How to run Django on IIS on a Windows server
Set-enable Python virtualenv on Windows
Run Jupyter on Ubuntu on Windows
How to install Python [Windows]
Run python with PyCharm (Windows)
Install watchdog on Windows + Python 3.3
Python + Kivy development on Windows
Sphinx-autobuild (0.5.2) on Windows7, Python 3.5.1, Sphinx 1.3.5
Put Python 3.x on Ubuntu
Fastest Python installation on Windows
Build Python environment on Windows
Run Tensorflow 2.x on Python 3.7
Update python on Mac to 3.7-> 3.8
Run Python CGI on CORESERVER
Run unix command on python
Build python environment on windows
How to run Notepad ++ Python
I ran python on windows
[Python] [Chainer] [Windows] Install Chainer on Windows
Use Python on Windows (PyCharm)
Run Jupyter Notebook on windows
What to do if the Microsoft Store opens even if you run python on Windows
How to run a Python file at a Windows 10 command prompt
Don't lose to Ruby! How to run Python (Django) on Heroku
Sample to put Python Flask web app on Azure App Service (Web App)
I tried changing the python script from 2.7.11 to 3.6.0 on windows10
How to run Python on Windows without polluting the environment as much as possible (Scoop edition)
Python environment construction memo on Windows 10
Installing Kivy on Windows10 64bit Python3.5
Anaconda python environment construction on Windows 10
Put MeCab in "Windows 10; Python3.5 (64bit)"
How to use Dataiku on Windows
ESP32 --Request to Discord-Webhooks using MicroPython
Preparing to run Flask on EC2
Install python2.7 on windows 32bit environment
Introduction to Python Hands On Part 1
Install xgboost (python version) on Windows
Install Python on Windows + pip + virtualenv
Run Tensorflow natively supported on windows
Install Pytorch on Blender 2.90 python on Windows
How to install pycrypto on Windows
Integrate Modelica and Python on Windows
How to deploy django-compressor on Windows
Run Python on Schedule on AWS Lambda
Run TensorFlow Docker Image on Python3
How to run matplotlib on heroku
Run SwitchBot on Windows 10 with Bleak