Skip to content

Hibiscus sense ESP32 Micropython tutorial and example code.

License

Notifications You must be signed in to change notification settings

myduino/Hibiscus-Sense-Micropython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hibiscus Sense ESP32 Micropython Tutorial (English)


Getting Started - Flashing Your Hibiscus Sense ESP32 IoT Developtment Board

To get started with MicroPython on your Hibiscus Sense ESP32 Development Board, you will need to flash it with MicroPython firmware with a handy tool called esptool.py.

Prerequisite

1. Download and Install Python

Download Python and install it. Make sure the option for Add Python To Environment Variable was ticked

2. Download MicroPython Firmware

MicroPython are available for various microcontroller ranging from STM32, Raspberry Pi Pico and also Espressif's ESP32 board. You need to make sure you download the right firmware for this development board. Download from the link and save on your machine. ( I recommend to save it in Downloads folder)

MicroPython Firmware

You will later install this firmware through terminal and to make life easier, you will need to rename the file when downloading it as something simpler rather than typing the whole name.

Renamed

3. Installing esptool.py

  1. To start, you will need to access terminal on windows. , click the Windows button and type in cmd and click the Command Prompt application.
  2. Run the following command

pip install esptool

You should now be able to run esptool. If you type esptool.py and run it there will be a few argument printed on the terminal.

4. Erase ESP32

You will need to erase whatever firmware in the ESP32 and back to a clean slate.

  1. On the terminal,run the following command

esptool.py --chip esp32 erase_flash

Erase ESP32

In my case, I have a few USB device connected and it automatically choose the one with ESP32 on COM11, (more on this later)

5. Flash MicroPython ESP32 Firmware

  1. The first thing to do is to identify what is the port number your ESP32 is assigned. To do so, click Windows button on your machine and run Device Manager application. If you collapse the Ports (COM & LPT) option, you will what is the port number assigned to your ESP32 by referring to the deviced named as Silicon Labs CP210x (USB driver IC). Mine was COM11.

  1. Navigate to the folder where you save your MicroPython firmware. In my case, I saved it in Downloads folder on my machine and to navigate to the folder;

C:\Users\[user]\Downloads

  1. Run the following command and replace the serial port number and the name of the firmware

esptool.py --chip esp32 --port [serial_port] write_flash -z 0x1000 [esp32.bin]

It should look like this

The final result will look like this


Installing and Setting Up Thonny IDE for Micropython

Prerequisite

1.Download and Install Thonny

  1. On the website, choose the Windows version and download it.

  1. Install and run it.

2.Setting Up Thonny MicroPython Intrepreter

  1. Setup interpreter on Thonny by going to

Tools > Option >Intrepreter > Micropython (Generic)

  1. Setup Port

Tools > Option >Intrepreter > Port >

About

Hibiscus sense ESP32 Micropython tutorial and example code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages