Page 1 of 1

Programming 2 NXT in BCC

Posted: 19 Nov 2012, 01:51
by cpapple123
I'm programming some Bluetooth communication with two NXT. Both are connected to the PC via USB currently or BT if necessary. With both programs open can I differentiate between the two NXT and have Mater Program download to the Master NXT and Slave Program download to Slave NXT. Or do I have to swap the cord and close the coms and find the connected NXT?

Re: Programming 2 NXT in BCC

Posted: 20 Nov 2012, 03:19
by mcsummation
I solved this issue by connecting the Master to the computer via USB, then connecting the Slave to the Master via BT. I download both programs to the Master. When the Master program starts, it sends the slave file to the Slave, then starts the slave program.

Re: Programming 2 NXT in BCC

Posted: 20 Nov 2012, 14:50
by HaWe
..which of course will work only for small programs
- but not for large ones if the overall size of master and all slave programs exceeds the 256 k limit of the flash...
(some of my master *.rxe programs have already alone a compiled size of up to almost 256 kByte, each slave programs has a similar size )

Re: Programming 2 NXT in BCC

Posted: 20 Nov 2012, 18:01
by afanofosc
Doc's programs are huge but they can't be quite that huge. The enhanced NBC/NXC firmware takes up 156,672 bytes of the available flash memory. The standard firmware is a little smaller but it still uses about 139,520 bytes. So with the standard firmware you only have 122624 bytes available for user files, including executables. With the NBC/NXC firmware you only have 105472 bytes available for user files or about 17k fewer bytes than the standard firmware allows.

I would download your programs via USB and switch cables. Or you can have multiple NXTs connected via multiple USB cables and simply have BricxCC disconnect and reconnect to a different NXT using its specific usb brick resource string or an alias for the full brick resource string. There is not currently any way to have BricxCC automatically switch its communication layer from one NXT to the next based on the active editor window or anything like that.

John Hansen

Re: Programming 2 NXT in BCC

Posted: 20 Nov 2012, 18:44
by HaWe
:oops:
I stand corrected.
of course John is right.
the programs are partially quite as big as the available flash (and sometimes were even were too big for the flash so they had to be reduced), so I stupidly assumed they would be as big as the complete 256k flash without looking closer to the file properties.
But they indeed are a whole lot smaller than 256k as I now observed (e.g., 80-100k).

Always best to check the facts before trying to describe it from memory.

Nevertheless, I can't download 3 or 4 similar ones to the same brick for both master and all slaves.
:oops:

Re: Programming 2 NXT in BCC

Posted: 21 Nov 2012, 01:06
by cpapple123
Thank you to all for the insight. I will carry on Dual Cable or swapping. My current project may not need a slave program. Just came across the section of the BCC tutorial that demo direct command of remote NXT's. Going to play some with this.

Re: Programming 2 NXT in BCC

Posted: 21 Nov 2012, 01:18
by mattallen37
I open two instances of BCC and differentiate between the NXTs using aliases.