Subject:
|
Re: Managing Memory
|
Newsgroups:
|
lugnet.robotics.nxt
|
Date:
|
Sun, 15 Oct 2006 14:47:32 GMT
|
Viewed:
|
11628 times
|
| |
| |
In lugnet.robotics.nxt, Edwin Pilobello wrote:
> I've got 8 kids working on NXT who have been experiencing
> "not enough memory".
I've tested some, but not a lot (speed of execution I've tested more). Yes,
NXT-G is not memory-friendly, *but*...
http://www.firstlegoleague.org/sitemod/upload/Root/WritingEfficientNXTGPrograms2.pdf
The biggest first problem is putting a bunch of nice sound files on-board (and
especially not deleting them later). The nest biggest savings is by deleting all
the "system" files. And then, teach them about reusable code and MyBlocks - that
can end up being a huge savings in memory (and, actually complexity). Also note
the document talks about something called "miniblocks". Trust me, they are
likely to be very popular once released.
> I guess I'll make [measuring block size] a class project.
As a suggestion, the size of the files on the NXT is truncated. The way I'd do
this for maximum resolution, is to make a "default" program that is, say, a
single sound block. Load it to the NXT, then download it back to the computer,
so you can see exactly how many bytes it takes. Now add, say, 1, or 4, or 16
Move blocks, and do the same upload/download routine to get the NXT programs
into the computer for analysis.
Then, to show the kids why you use MyBlocks, define a single Move block as a
MyBlock, and make a copy of the program that is 16 of these "trivial" MyBlocks
long.
--
Brian Davis
|
|
Message is in Reply To:
| | Managing Memory
|
| I've got 8 kids working on NXT who have been experiencing "not enough memory". So, I did a little experimenting. Every new program takes a minimum of 6K. Every Move Block takes 0.5K Imagine that! 500 bytes for a simple move block. I haven't measured (...) (18 years ago, 14-Oct-06, to lugnet.robotics.nxt)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in NXT programmable brick
|
|
|
|