Editing Tutorial AutoRun
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 13: | Line 13: | ||
* write the code you want to execute into the file main.py | * write the code you want to execute into the file main.py | ||
* write your code as a module that can be executed by calling a function. call this function from main. | * write your code as a module that can be executed by calling a function. call this function from main. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
= Examples of main.py = | = Examples of main.py = | ||
Line 60: | Line 40: | ||
== Code Example: selectively call function in module from main.py - boot switch == | == Code Example: selectively call function in module from main.py - boot switch == | ||
− | [[File:BootSelektor.JPG | + | [[File:BootSelektor.JPG]] |
<syntaxhighlight lang="python" line='line'> | <syntaxhighlight lang="python" line='line'> | ||
# main.py - example how to call a function (with your code) from the main.py file | # main.py - example how to call a function (with your code) from the main.py file | ||
Line 74: | Line 54: | ||
mycode.mymain() | mycode.mymain() | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | = Instructional Videos = | ||
+ | |||
+ | == How to Autorun MicroPython code == | ||
+ | This shows how to use main.py as entry point to shart your MicroPython code. It looks at how to stop a running program with a terminal program (e.g. Putty). We introduce how to add a boot selector switch. | ||
+ | |||
+ | There is a video on Youtube (29:23) that shows the software: https://youtu.be/kzgUN_h1bqw | ||
+ | |||
+ | <youtube>https://youtu.be/kzgUN_h1bqw</youtube> |