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 3: Line 3:
  
 
= Run your MicroPyton code directly at Boot-up of ESP32/ESP8266 =
 
= Run your MicroPyton code directly at Boot-up of ESP32/ESP8266 =
In this part of the tutorial, we talk about the boot process and how to start your own code at boot-up time. For this, we show how to use 'main.py' as the entry point. We have an example of how to use a Pin/switch to select whether to boot into your code or to not start a program.
+
In this part of the tutorial, we talk about the boot process and how to start your own code at boot-up time. For this, we show how to use 'main.py' as entry point. We have an example how to use a Pin/switch to select whether to boot into your code or to not start a program.
  
We also look at how to use the [[uPyCraft]] IDE when autorun code, basically how to connect with Putty (or any terminal program) to remove main.py to be able to connect again with uPyCraft IDE.
+
We also look at how to use the uPyCraft IDE when autorun code, basically how to connect with Putty (or any terminal program) to remove main.py to be able to connect again with uPyCraft IDE.
  
 
== Success criteria ==
 
== Success criteria ==
* you understand how the boot process works (boot.py then main.py)
+
* you understand the boot process works (boot.py then main.py)
 
* you have written some code and configured the ESP32 so that it is executed at boot time automatically
 
* you have written some code and configured the ESP32 so that it is executed at boot time automatically
* you have written a main.py that allows you to select whether to boot into your code or not
+
* you have written a main.py that allows to select whether to boot into your code or not
  
 
== Required Module and Files ==
 
== Required Module and Files ==
 
To enable autorun you have to create a file that is called 'main.py' that is in the main directory. There are different ways to do this:
 
To enable autorun you have to create a file that is called 'main.py' that is in the main directory. There are different ways to do this:
 
* 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 the main.
+
* write your code as a module that can be executed by calling a function. call this function from main.
  
 
== Related Components ==
 
== Related Components ==
  
The components are related to the [[LMUBox]]. For more components, see the [[Hardware List]]. Many of the pages on actuators and sensors include additional examples.
+
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 ===
 
=== Microcontroller ===

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)