8/30/2023 0 Comments Esp32 visual studio codeThis code will work for both ESP32 and ESP8266. Notice that we are using GPIO2 to configure the LED as an output pin as the onboard LED is connected through that GPIO. Inside the main.py file copy the code given below which will turn the on-board LED on and off after every 1 second. In our case, we will leave the boot.py file empty as we are programming our ESP board for a simple LED blinking project so we just need the main.py file. The main.py file contains the main script of the program which gets run right after the boot.py file. This contains the support code which runs on boot. The boot.py file is run first when the connected device is powered on or boots. Inside the folder create two files namely main.py and boot.py which are a characteristic of every MicroPython program. Inside pymakr, go to File > Open folder and select the Led_project folder which we just created. Then, we will create a folder on your computer and name it Led_project.The ESP module will automatically get connected with the pymakr. Make sure you have edited the pymakr.json file correctly and according to your device connected. Next, we will open the Visual studio code and enable the pymakr plugin in it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |