Starting a new program foo.rxe in NXC

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
michaistinie
Posts: 2
Joined: 07 Feb 2013, 09:37

Starting a new program foo.rxe in NXC

Post 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
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Starting a new program foo.rxe in NXC

Post 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.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
michaistinie
Posts: 2
Joined: 07 Feb 2013, 09:37

Re: Starting a new program foo.rxe in NXC

Post 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
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 5 guests