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 14: Line 14:
 
* 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.
  
== Related Components ==
+
= Examples of main.py ==  
 
 
The components are related to the [[LMUBox]]. For more components, see the [[Hardware List]]. Many of the pages on actuators and sensor include additional examples.
 
 
 
=== Microcontroller ===
 
* [[ESP32 Web Kit]] with integrated OLED Display from Heltec
 
 
 
=== Sensors (and physical controllers) ===
 
* [[Switch]]
 
 
 
= 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>
 
 
 
 
 
= Examples of main.py =  
 
  
 
== Code Example: code in main.py ==  
 
== Code Example: code in 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|300px]]
 
 
<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 53:
 
     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>

Please note that all contributions to Sketching with Hardware at LMU Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see My wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)