000 - ESP32 MicroPython: How to Get Started with MicroPython

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we will learn how to get started with micro python i will walk you through in setting up your micropython environment and we will also prepare the development board of your choice to work with micro python for this tutorial i will be using an esp32 development board from espresso but this tutorial will be compatible and would work with other micropython compatible board with some minor adjustments especially with pin assignments maybe sometimes i will be also using this one this one is healthtech wi-fi kit which is also with esp32 on board now we are here in my desktop i will be opening my google chrome so in preparation number one download tonypython ide from tony.org and since i am using windows i will be downloading the windows version and it's also compatible with linux mac and windows so hit download and save it to and save it to the folder of your choice i will be saving it in the desktop for easy reference so here this is one of the best beautiful and beginner friendly ide available we will also use tony python to erase and flash new firmware to esp32 with the help of esp tool login number two download the micropython firmware from micropython.org micro python.org go to download section and at the bottom there is by the way these are the boards compatible with micro python this is spyboard stm32 and this one wi-fi with y and espresso boards which are esp8266 esp32 and tinypico tinypico is also esp32 by the way so download the generic esp32 module and scroll down look for esp32 [Music] yeah download the latest stable version so for the stable these are the stable versions or this one 1.13 it's newly released last september 2 so i will download this one and save it to the folder of your choice and i will choose again the folder i created in the desktop with micro python number three download the esp32 usb driver from silicon labs website google silicon [Music] knobs yeah this one and this one it's under the scilabs.com and download this software i am using windows 10 so i will download this one and save it again to the folder of your choice i will save it again in the desktop micro python folder start the mode okay number four and for later references download the pin assignments or pin pin outs or a schematic diagram of your development board you will be needing it later on to know let's say the pin assignment of the onboard led so i have here a copy of the pin assignments for this esp32 development board so i will post the link of this for you to download i also have the schematic diagram but this one is not exactly for this like uh development board because i think this one has 36 pins while this one has a total of 30 pins only this is this is do it esp32 dev kit version 1 with 30 pins number 5 now that we have all the necessary files let's install the tonypython ide so let's install the tonypython in desktop micro python folder tonypython ide next accept just run it maybe create desktop shortcut for easy references and install tonypython is beginner-friendly ide because it is simple to use and all the necessary tools is included such as ripple terminal python editor file access to micropython file system and even flashing the micropython firmware and these are all available in graphical user interface no daunting command lines all is click here and there in one simple ide of course there are more feature rates applications available we can look at such as bs code but as of this moment let's just use tony python for simplicity so i will click finish number six install the esp32 usb driver so i will extract this one using a 7-zip extract to same folder and look for x64 because i am using 64-bit windows and just click yes then next and finish let's verify if the installation of the usb driver is successful by connecting the esp32 to our computer then right click the start start button and look for device manager under the device manager click for the ports and if you are successful installing the usb driver you should see the silicon lab cp210x usb to uart breeds with com number and as for me this is comport take note of this because we will need this one later on before we can begin using the esp32 for micro python development and programming we need to erase the original firmware and then flash a new firmware with micro python interpreter installed so let's open the tonypython i already have the micropython inside so that's why i'm having this whole prompt of the micropython but for the sake of tutorial i will show you how to flash the esp32 with new firmware to do that click the tools menu in the tony python manage plugins and in the search box type esp tool and hit enter click install and give it some time downloading then installing okay done when you see the uninstall button here i will just click close now we are ready to plus a new firmware to our esp32 to do that click again the tools menu then select options and click the interpreter tabs then here which interpreter or device should tony use for running your phone i will select esp32 it could be circuit python but i'm adapt or micro python by using the bbc micro bit or micro python esp32 et2 66 or micro python generic this one is using pi board so let's select the micro python esp32 and in the ports select the correct com port which is comport then click open the dialog for installing or upgrading micro python on your device i will click this one and in the port select again the comport and in the firmware select browse and go to the folder you choose before i choose the one the micro python folder in the desktop then i will select the bin pile which is the firmware with micro python interpreter installed so i will open then make sure that the erase flash before installing is tick or check should be checked then click install give it some time until this one is successful okay erasing is complete now writing now it's splashing a new firmware to the esp32 click ok click close and click ok now the micro python is successfully installed to the esp32 development board now we can check this one we can test some code let's make the onboard led lights on and lights up making some codes import machine and let's create a variable led and set it to the pin into the onboard led and and let's set the pin direction to output and to turn on the led we just need to send led that on as you can see the led on board is turned on to turn it up just send led.o like that or led that value equals 1 or led that value equals zero to turn it up or led that value to true or led that value to false very easy right and you can make it without compiling and the moment you send the the code like this one led that value to true the moment i press this one the onboard led will turn on see it's very pass you may ask how about to blink the onboard led just like the blink example of the arduino to do that we need to import a time or delay import time okay now while true so to turn it on led that on we need to wait some time or delay some time so that is time at this time that sleep let's say for 500 milliseconds 0.5 led that oh and time that slip to 0.5 so when i hit enter twice it will execute the code one two and as you can see the led the onboard led is now blinking just like the blink example of the arduino ide that's all for now in the next video we will learn what is micropython and how it works for any question or suggestion regarding this tutorial please feel free to write it in the comment section and i will be happy to answer it you may also interested to check out the companion blog post of this tutorial for additional information at tech2tinker.blogspot.com and if you enjoyed this video give me thumbs up and share this to your friends and subscribe for more videos like this thank you and have a good days ahead see you on the next video bye
Info
Channel: TechToTinker
Views: 15,016
Rating: undefined out of 5
Keywords: MicroPython, how to get started with micropython, how to install micropython, esp32 micropython, micropython esp32, how to use micropython in esp32, thonny python ide, how to flash micropython on esp32, Gorilla Cell ESP32, ESP32 MicroPython, how micropython works, how to install micropython on windows, how to download micropython, micropython esp32 projects, micropython tutorial, micropython esp8266, micropython raspberry pi pico, raspberry pi pico
Id: elBtWZ_fOZU
Channel Id: undefined
Length: 15min 53sec (953 seconds)
Published: Fri Sep 04 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.