🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How can I start my micro python program at reset

    Micropython
    3
    3
    6.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      Powersoft
      last edited by

      Hello,
      I wont to write a simple python code thats at startup (reset) my screen cleared and print a message.
      The program has only 3 lines of code, but in which file I should put in these lines so that it starts automatically.
      I use VS code to program it.
      Thanks for any help.

      1 Reply Last reply Reply Quote 0
      • lukasmaximusL
        lukasmaximus
        last edited by

        Code that you wish to run on boot should either be in boot.py or main.py and there should be a reference in the boot.py to tell it which python script to load

        1 Reply Last reply Reply Quote 0
        • M
          maechler
          last edited by maechler

          I placed my stuff into the /apps folder, e.g. /apps/demo.py. On startup you can then press the button in the middle to enter the app list, choose your app demo and from there on it will be started automatically when you reboot.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post