Page 1 of 1

Starting a new program foo.rxe in NXC

Posted: 07 Feb 2013, 09:54
by michaistinie
Hi guys,

Is there any way to start a new program "foo.rxe" from a running "bar.rxe" in NXC ?

The problem I have is that the code I am using is rather big, due to the usage of Wifiblock and a few other libs.
I would like to create a small dispatcher, which can start programs, delete programs, requests programs to be downloaded on the brick, etc.
I've looked through the excellent NXC documentation, but I haven't found anything... (or maybe I'm too dumb to identify the right pieces)

I know about tasks, and in theory this should be enough for almost everything, but it would fit my needs much better if I could more or less reprogramm the robot "on the fly".
The reprogramming (or getting the new *.rxe compiled code) would not happen over Bluetooth but from a webservice through the wifiblock.

Thanks,
Micha

Re: Starting a new program foo.rxe in NXC

Posted: 08 Feb 2013, 18:44
by mattallen37
From what I've heard, it's impossible to start an .rxe from another .rxe (at least in the Lego, and Enhanced firmware). I've heard the most direct way to do this, is to send a message to another NXT, and have that NXT issue a direct command back to the first NXT to run the other .rxe.

Re: Starting a new program foo.rxe in NXC

Posted: 11 Feb 2013, 12:20
by michaistinie
Thanks Matt!

It seems my approach was rather difficult, so I switched plans. Today my Raspberry Pi and the wifi stick arrived, with those I sould be able to exchange/start the programs on the brick much easier (with a simple USB connection between RPi and NXT, "on the bot").

Bye,
Micha