How to connect MicroPython firmware to ESP8266 - Black keyhole

welcome to our keyhole, we provide you various knowledge from various sources such as Electric&Electronic, Health, Arduino, IOT, Diy projects, A/l past paper and model paper, Even though you can keep in touch with current technology

How to connect MicroPython firmware to ESP8266

Share This


Recall that MicroPython is designed to work on small microcontroller platforms. Some of
these microcontroller platforms use a special chip that contains the MicroPython binaries
(libraries, basic disk IO, bootstrapping, etc.) as well as the microcontroller, memory, and
supporting components.
When you use a MicroPython board – like most microcontrollers – you must first
write your code and load it onto the board. Most MicroPython boards have a USB flash
drive that mounts when you connect it to your computer using a USB cable. This flash
drive stores a couple of files you can modify to change its behavior. You can also copy
your program (script file) to this drive for execution at boot time.

You can also use the MicroPython console, which is very much like the Python
console. The MicroPython console is called the run, evaluate,
print loop, or REPL console. The console makes it very easy to get started and to debug
(remove errors from) your program before loading it on the board for execution every
time the board is powered on.


Here I will explain you how to work on setting up MicroPython board. We will use MicroPyhton board as NodeMcu to try some basic Script. If you didn't see my previous article about Get Started with MicroPython  find out the article here



Connecting MicroPython Boards to Computer

    From here, I will name NodeMcu as MicroPython board. Use the USB cable to make the connection between MicroPython board and Computer. After connection you will see Blue LED blinking on your board.


 



If you are using Windows platform, open the Device manager, You should see NodeMcu board detected on Ports (COM & LPT). You can see in the picture shown bellow.


                 


Flashing The Latest MicroPython Firmware


        In this section, we try to flash the latest MicroPython firmware. You can get the
latest MicroPython firmware by clicking this link http://micropython.org/download/all/. Select the link accordance to your board as ESP32 or ESP8266. In my case I'm using ESP8266 also download the latest version of the Firmware. Consider that extension should be as *.bin. 


I'm using windows platform, So I will show you how to flash the firm into NodeMcu using Windows platform. If you want to program ESP8266 or ESP32 using MicroPython firmware I recommend to use
uPyCraft IDE. Before Installing this IDE make sure that you already have installed the latest version of python(3.7.x or 3.8.x). Click here to download uPyCraft IDE for Windows.

After the installation process, Open the uPyCraft IDE You will see something like this






Upload MicroPython Firmware to ESP8266


    Go to Tools > Serial and select your ESP8266 COM port (in our case it’s COM13).


                                        

  Go to Tools > Board. For this tutorial, we assume that you’re using the ESP8266, so make sure you select the “esp8266” option:




Select all these options to flash the ESP8266 board:


    


After that Click on Users then browse the "*.bin" file that we already have installed it. I mentioned
it in above text.





                               



While holding down the “BOOT/FLASH“, click the “ok” button in the burn firmware window:




When the “EraseFlash” process begins, you can release the “BOOT/FLASH” button. After a few seconds, the firmware will be flashed into your ESP8266 board.


after flashing the Micropython firmware to the ESP8266, If you want to use Arduino IDE, just upload the code in as usual way.


No comments:

Post a Comment

business queries

Pages