Author |
Message |
Thibaud
Novice
Joined: Sun Feb 24, 2008 6:15 pm Posts: 50
|
 Autostart program
Hi,
Is it possible to autorun a program at the power on of the brick?
Thanks,
Thibaud.
_________________My Eurobot team website : http://blog.mlrobotic.com/My MOCs : http://nxtgen.6mablog.com
|
Mon Apr 15, 2013 11:16 am |
|
 |
mattallen37
Expert
Joined: Thu Sep 29, 2011 11:09 pm Posts: 184 Location: Michigan USA
|
 Re: Autostart program
With Lego FW, you name the executable "! Startup.rxe", and it will automatically get run when the NXT powers on.
_________________ Matt
|
Mon Apr 15, 2013 1:27 pm |
|
 |
Thibaud
Novice
Joined: Sun Feb 24, 2008 6:15 pm Posts: 50
|
 Re: Autostart program
Thanks, but is it the same with the robotc firmware? is it the same extension filename?
_________________My Eurobot team website : http://blog.mlrobotic.com/My MOCs : http://nxtgen.6mablog.com
|
Tue Apr 16, 2013 3:39 am |
|
 |
mattallen37
Expert
Joined: Thu Sep 29, 2011 11:09 pm Posts: 184 Location: Michigan USA
|
 Re: Autostart program
Sorry, but I'm not familiar enough with the finer details of ROBOTC.
Try saving your program as "! Startup" (with the regular extension, which should be ".c"), and then compile and download it to the NXT. Turn the NXT off and back on and see if it automatically starts executing the program. With Lego FW it works fine, but I'm not sure about with ROBOTC FW.
_________________ Matt
|
Tue Apr 16, 2013 12:38 pm |
|
 |
NeXT-Generation
Senior Roboticist
Joined: Wed Sep 28, 2011 10:13 pm Posts: 630 Location: If I told you, I'd have to kill you.
|
 Re: Autostart program
AFAIK RobotC programs are also stored as .rxe files when on the NXT. Try the "! Startup.rxe". If that doesn't work, feature request?  Because I've wondered this too.
_________________A.K.A. inxt-generation Self-proclaimed genius, and future world dominator. My Brickshelf Folder"Don't they teach recreational mathematics anymore?" - The Tenth Doctor Bow down to Nikola Tesla, King of the Geek Gods.
|
Tue Apr 16, 2013 1:55 pm |
|
 |
Coder A
Moderator
Joined: Thu Jan 03, 2013 5:10 pm Posts: 207 Location: The plateau north of the Ohio River Valley, also known as Cave Country.
|
 Re: Autostart program
Yes, .c is the extension for the text format of the code when on the computer. .rxe is the extension for the compiled information on the brick. I would hope this is supported, it sounds like a neat idea; I actually thought about it a while back. EDIT: Yes! It works. I made some code and here it is. Make sure to match case and spacing when naming your program ! Startup. Here: Turn your nxt off and on and see what happens!
_________________ I'm not a robot! I'm british! ~ quote from an asparagus I am not a robot! I am a unicorn! ~ quote from a robot
|
Fri Apr 19, 2013 5:10 pm |
|
 |
Thibaud
Novice
Joined: Sun Feb 24, 2008 6:15 pm Posts: 50
|
 Re: Autostart program
Thanks a lot for your answers.
I've tested the "! Startup.rxe" filename and it works perfectly !
_________________My Eurobot team website : http://blog.mlrobotic.com/My MOCs : http://nxtgen.6mablog.com
|
Sat Apr 20, 2013 5:10 pm |
|
 |
roboRed
Expert
Joined: Fri Nov 02, 2012 12:07 am Posts: 163 Location: California, USA
|
 Re: Autostart program
Huh. I didn't know that you can do this! It's awesome! 
_________________ string Robored = "Awesome" ~~Neil Balch~~
|
Mon Jun 03, 2013 8:19 pm |
|
|