I have a problem when I download my code
The file can be downloaded but not run successfully. I download and run on upycraft. But when I disconnect, the code doesn't run.
the shell shows
Ready to download this file,please wait!
....
download ok
exec(open('blink.py').read(),globals()) /*Every time it gets stuck here, unless I stop it*/
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 13, in <module>
KeyboardInterrupt:
English is not my native language. Please forgive me if there is something wrong with the words.Thank you!
I have a problem when i download my code
- MostlyHarmless
- Posts: 166
- Joined: Thu Nov 21, 2019 6:25 pm
- Location: Pennsylvania, USA
Re: I have a problem when i download my code
MicroPython only runs main.py at startup.
When you click the run button in uPyCraft, it runs blink.py for you, but on startup you have to tell it.
The easiest thing to do is add "import blink" to the top of main.py.
When you click the run button in uPyCraft, it runs blink.py for you, but on startup you have to tell it.
The easiest thing to do is add "import blink" to the top of main.py.