Skip to content

circuitsmy/CIRCUIT-PLUS-MicroPython-Tutorial

Repository files navigation

CIRCUIT PLUS - MicroPython Tutorial

circuitsPlus_label (1)

Getting Started – Installation

Before we start our Micropython tutorial, we need to install some software as prerequisite of this tutorial.

Prerequisite

Installing Micropython Firmware

The MicroPython firmware are available for many microcontroller-ESP based built. You will see several firmware on the list. The correct installer that you have to download the installer as shown below:

firmware

When downloading the file, you will need to rename the file. Since the filename is long and it will be hard for you to type the long name. Rename it simpler as ESP32.

Installing esptool.py

  1. On your search windows, type in cmd and click the Command Prompt Application.

  2. Type the following command and pressed Enter.

    <pip install esptool>

pipinstall (2)

You will see some file are being downloaded to complete the esptool installation. To check the esptool is successfully downloaded, you can type in esptool.py and run. Then, the cmd terminal will run your command. Otherwise, it will be error.

Clean ESP32 Firmware

You need to clean the firmware by erasing everything unrelated to make the ESP32 firmware in a clean state. For this action, you must connect your Circuit Plus Board to your computer.

Go to your cmd and type this following command:

`<esptool.py --chip esp32 erase_flash>` 

erase flash (2)

You will see the command will connect to the board and access the chip and completely erase the flash.

ESP32 Serial Port Configuration

Serial Port number have been assigned to the Circuit Plus Board when you connect the board to the computer. To check the assigned serial number, you have to go to your computer Device Manager.

  1. Go to search Window and type Device Manager and click the Device Manager Application.
  2. Click down the Ports and see the list of ports connected to your computer. By referring to the list, you should be able to see the serial port number for the Circuit Plus Board.

port (2)

If you unsure which one is the port that your board connected to, try connect and disconnect the board from your computer. You will see it on the device manager.

  1. Then, Navigate your Micropython firmware address. Since I downloaded the firmware and stored in the Download folder then I shall use this location link.

You can get it by right click the Download Folder. Download Properties > Location

dwld (2)

`<C:\Users\PC1\Downloads>` 

Copy the location address and paste it to your command prompt.

cmd (2)

  1. Next, type this following command.

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

In the command, replace the serial port number with the serial number that you get before. Also, change the firmware name to the name you have save before and run the command.

scmd (2)

The result should be like this:

whatever

Configure MicroPython with Thonny IDE

  1. Download Thonny IDE and complete the installation.

thonny

  1. Open your Thonny Ide and setup the Intrepreter and the port options and save.

    Go to Tools > Option > Intrepreter > MicroPython (Generic)

  2. Setup the port

    Port > [Current Circuit Plus Port]

option (4)

About

CIRCUIT PLUS - MicroPython Tutorial

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages