Programming 2 NXT in BCC

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
cpapple123
Posts: 44
Joined: 04 May 2012, 20:20

Programming 2 NXT in BCC

Post 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?
mcsummation
Posts: 220
Joined: 23 Jan 2012, 17:07
Location: Round Rock, TX

Re: Programming 2 NXT in BCC

Post 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.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Programming 2 NXT in BCC

Post 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 )
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Programming 2 NXT in BCC

Post 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
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Programming 2 NXT in BCC

Post 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:
cpapple123
Posts: 44
Joined: 04 May 2012, 20:20

Re: Programming 2 NXT in BCC

Post 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.
Last edited by cpapple123 on 21 Nov 2012, 01:29, edited 1 time in total.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Programming 2 NXT in BCC

Post by mattallen37 »

I open two instances of BCC and differentiate between the NXTs using aliases.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
Post Reply

Who is online

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