![]() |
Forum Index : Microcontroller and PC projects : PicoMite Autorun
Author | Message | ||||
cosmic frog Guru ![]() Joined: 09/02/2012 Location: United KingdomPosts: 302 |
Hi all. I'm probably missing something really simple here, but, How do I get my program to autorun on the PicoMite? The manual says I need to make a subroutine with the name MM.STARTUP. "When the MicroMite is first powered up it will search for this subroutine and, if found, it will be run once" Where do I put this subroutine? Is it stored on a file on the SD card or in flash? I just want my program to run from power up. How do I do this? Thanks. Dave. |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 633 |
Simply set the option OPTION AUTORUN ON Along with any of your other options. The program you are currently working on will then start as soon as power is applied. Regards |
||||
cosmic frog Guru ![]() Joined: 09/02/2012 Location: United KingdomPosts: 302 |
Ha! That simple. ![]() So it's just like all the other 'Mites then. I don't know how I missed that. Anyway, Thankyou for your help. ![]() Dave. |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2640 |
Just to be different, you could do this:- Sub MM.STARTUP Your Program Here. End Sub Another Program Here. When the first ends the second starts. |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
I was pondering something along these lines: Is it possible for a particular SD card to be 'Autorun'? Ie, stick the card in, turn on the 'mite, and the configured program runs automatically. Replace the card with a 'normal' one and the 'mite just boots to the usual command prompt. Visit Vegipete's *Mite Library for cool programs. |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2640 |
I have not tried this but give it a shot anyway, just to see what happens. Sub MM.STARTUP Load "Your-Program.BAS" Run End Sub Or Sub MM.STARTUP Run "Your-Program.BAS" End Sub . Edited 2022-04-03 18:09 by phil99 |
||||
Tinine Guru ![]() Joined: 30/03/2016 Location: United KingdomPosts: 1646 |
PMJI but this thread just reminded me: I had read, some time ago that OPTIONs should be command line only but I have seen AUTORUN in the source. Is this kosher? I messed-up one time where I had modified code, using MMEdit and apparently it wiped-out the AUTORUN. When they cycled the power, the program didn't start and so I had to re-visit (200 mile round-trip). Craig |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |