🤖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

    Scheduled Pinned Locked Moved Micropython
    3 Posts 3 Posters 7.7k Views 2 Watching
    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 Offline
      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 Offline
        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 Offline
          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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post