Search found 18 matches

by roscohead
03 Feb 2012, 21:25
Forum: Mindstorms Software
Topic: NXT-NXT bluetooth
Replies: 1
Views: 4129

NXT-NXT bluetooth

OK, I just decided to start a project that requires my NXTs to communicate. It's a fairly simple deal, with one NXT being the main controller (with motors sensors etc) and the other being a remote controller (sends commands, receives status updates). I found Danny's bluetooth lib http://robotics.ben...
by roscohead
22 Nov 2011, 08:13
Forum: Mindstorms Software
Topic: NXC: Using CreateFile()
Replies: 4
Views: 8543

Re: NXC: Using CreateFile()

I think you are running into some bug totally unrelated to file IO. The program suddenly misbehaves, crashes, or even freezes the NXT when small changes are introduced. So I suspect it is some kind of firmware or compiler issue, perhaps because of the large array. (The complier creates 545 temporar...
by roscohead
22 Nov 2011, 00:03
Forum: Mindstorms Software
Topic: NXC: Using CreateFile()
Replies: 4
Views: 8543

Re: NXC: Using CreateFile()

Thanks for the info. It'd be great to be able to at least see the size of other files, see my next question: I have another question about creating files. I'm attempting to create a file of size 4360. When I run it, the program fails. I've included the code below. If I comment out the loop that writ...
by roscohead
20 Nov 2011, 08:56
Forum: Mindstorms Software
Topic: NXC: Using CreateFile()
Replies: 4
Views: 8543

NXC: Using CreateFile()

If I create a file with CreateFile(), am I able to see it listed anywhere on the brick? I can see it using file explorer, but I can't seem to find it anywhere on the brick menu. Using enhanced NXC FW 1.31.

ROSCO
by roscohead
04 Nov 2011, 19:02
Forum: Mindstorms Software
Topic: NXC: Initialising 3 dimensional array
Replies: 10
Views: 15863

Re: NXC: Initialising 3 dimensional array

Wow! Thanks for the unexpected update John! I really didn't mind initialising in code, I just wanted to make sure I wasn't doing something wrong! But now that you've gone to all that trouble, I guess I'd better use it ;)

ROSCO
by roscohead
01 Nov 2011, 03:00
Forum: Mindstorms Software
Topic: NXC: Initialising 3 dimensional array
Replies: 10
Views: 15863

NXC: Initialising 3 dimensional array

The following code does not compile, getting "Error parsing expression: }" on the last line of the program. Can 3 dimension arrays be initialised like this, or do they have to be done in code? ROSCO int MyArray[][][] = { { {0, -1}, {1, -1}, }, { {2, -1}, {3, -1}, }, }; task main() { Wait(1...
by roscohead
29 Oct 2011, 04:56
Forum: Mindstorms Software
Topic: NXC: Tasks and global variables
Replies: 12
Views: 18368

Re: NXC: Tasks and global variables

Doh, yes, you are correct, at some stage it appears I installed a 2nd copy, and the copy I was running was not the copy I've been updating (thanks, Bill, for shortcuts...). Second copy now deleted, happy to report I now get the correct array length. And the program I was initially working on is now ...
by roscohead
28 Oct 2011, 22:03
Forum: Mindstorms Software
Topic: NXC: Tasks and global variables
Replies: 12
Views: 18368

Re: NXC: Tasks and global variables

Interestingly, if I change the code back to

Code: Select all

  NumOut(80, line, ArrayLen(vx.a1));
the NBC comes out as

Code: Select all

	arrsize __D0print, __print_7qG2_vx_7qG2_000.a1
...
	numtostr __TextOutArgs.Text, __DU0print
A little different, but same result in the end.

ROSCO
by roscohead
28 Oct 2011, 21:56
Forum: Mindstorms Software
Topic: NXC: Tasks and global variables
Replies: 12
Views: 18368

Re: NXC: Tasks and global variables

Yes, optimisation level was 2, and I don't use -q (NXT doesn't beep on successful download?). Those were the only differences. So I experimented with different optimisation levels: 0: ArrayLen displays different number each time - always a multiple of 8. 1: Same as 0. 2: ArrayLen always displays zer...
by roscohead
23 Oct 2011, 07:37
Forum: Mindstorms Software
Topic: NXC: Tasks and global variables
Replies: 12
Views: 18368

Re: NXC: Tasks and global variables

Thanks John, apologies, it was the enhanced 1.28. I've downloaded test release 20110720, and loaded 1.31 from that into the NXT, but your program still displays the ArrayLen as 0 in all cases (but displays the correct array contents). Another interesting note though, if I change foo() to take a size...