main.py does not run automatically
Posted: Tue Jul 07, 2020 6:52 pm
I have started learning micropython today. I have successfully flashed my ESP8266 with latest stable micropython firmware, configured it with my router and was able to run webrepl.html with python prompt.
Now as I was following the tutorial https://docs.micropython.org/en/latest/ ... ystem.html I saw that there should be two automatic script boot.py and main.py. os.listdir() showed me there is only one boot.py. so I created one main.py containing a simple script
when I press the reset button and reconnect to webrepl, nothing happens. However when I type -> it runs and list the files. What am I missing? Also nothing happens if I download boot.py from device via webrepl, put these lines in it and reload it back.
I know this is very basic but pardon my ignorance as today is my "Hello World" day to Micropython.
I am on windows 10 pro but I guess that does not matter on a browser based interface.
Now as I was following the tutorial https://docs.micropython.org/en/latest/ ... ystem.html I saw that there should be two automatic script boot.py and main.py. os.listdir() showed me there is only one boot.py. so I created one main.py containing a simple script
Code: Select all
import os
print(os.listdir())
when I press the reset button and reconnect to webrepl, nothing happens. However when I type ->
Code: Select all
import main
I know this is very basic but pardon my ignorance as today is my "Hello World" day to Micropython.
I am on windows 10 pro but I guess that does not matter on a browser based interface.