Skip to main content

Introducing the Minblocks

A lot of folks have commented (to put it nicely) on the size of NXT-G programs relative to the memory on the NXT. Well, LEGO and NI it seems were listening. The new patch allows the user to add more blocks to the NXT-G pallets, including soon to be released blocks for 3rd party sensors, custom blocks individuals create with the LabVIEW Toolkit, and a selection of blocks straight from National Instruments called "miniblocks". The miniblocks are stripped down versions of some of the larger "stock" blocks, like the Display or Motor blocks. By going over those blocks with a fine-toothed comb, a (very!) hardworking team at NI has created specialized, targeted versions that upon being compiled only generate the needed bytecodes.

To put that another way, the miniblocks result in smaller programs on the NXT, as well as in some cases faster execution. For instance, 16 consecutive Display blocks generates a program on the NXT that is about 4k in size; but making the same program using 16 of the new miniDisplay blocks results in a program just 2.2 to 2.5 k in size, close to a 40% savings in memory. The miniMotor blocks are even more impressive, resulting in a savings of almost 70% over the "stock" Motor blocks! The miniblocks are also slightly faster in execution: Display a point, for instance, is about 30% faster than with the original Display block, as well as being smaller.

This doesn't answer all the issues folks have brought up with NXT-G and the memory on the NXT brick, but it shows two important things to me: first, LEGO & NI have been listening, and responding to things filtering out of the community (I strongly doubt this is the last time that occurs). Second, there are multiple solutions to any problem. Nope, they haven't added more memory to the NXT, they just reduced the amount of memory that programs need to run in... and done it less than a year after the product release. Well done!

For those who like numbers, here's the figures I got:
16 Move blocks: 11.8 kb
16 miniMove blocks: 7.7 kb
16 Motor blocks: 12.5 kb
16 miniMotor blocks: 3.9 k (!!)
16 Display blocks: 4 kb (with one Display block of a point taking 1.3 ms)
16 miniDisplay a RIC: 2.5 kb
16 miniDisplay a string: 2.4 kb
16 miniDisplay a point: 2.2 kb (with this miniDisplay block taking 0.93 ms)

Footnote: quite apart from these savings, I've also noticed that some FLL teams have gotten around any memory problems by using MyBlocks to save lots of memory, and even condensing down everything to one program where the kids select which mission to run on-screen (that way, any MyBlock used gets stored just once, instead of once per mission). Kudos to a number of FLL teams for working within the limits, and learning (& teaching!) something new.

The patch to NXT-G itself is rather nice: it adds another option under the "tools" menu, allowing you to import and export custom blocks into any of the subpallets within the Common pallets. I put the miniMove block in the subpallet with its big brother, and the miniDisplay blocks in with the original Display block... but you could put them anywhere you like. Keeping the the import tool in the menu keeps the interface from becoming cluttered as well, and it's fairly easy to use.

--
Brian Davis

Popular posts from this blog

MINDSTORMS Retires!

2023 is the 25th Anniversary of the MINDSTORMS brand. For 25 years, MINDSTORMS has educated and inspired a generation of robot builders, both children and adults. Unfortunately, the LEGO Group decided to end the line on December 2022. Many ROBOTMAK3RS have been passionately involved with the development of MINDSTORMS through the MUP and MCP programs. Even with the newest Robot Inventor line, several ROBOTMAK3RS were invited to submit additional bonus models that were included in the official app. Regardless of the retirement of a major LEGO robotics product line, ROBOTMAK3RS continue to MAKE-SHARE-INSPIRE using all LEGO robotics platforms available to us. Here is the official statement from LEGO. Since its launch in September 1998, LEGO MINDSTORMS has been one of the core ‘Build & Code’ experiences in the company’s portfolio, carrying with it significant brand equity and becoming a stand-out experience for the early days of consumer robotics and leading to current Build & Code

Celebrating 25 Years of MINDSTORMS

In celebration of the 25th Anniversary of MINDSTORMS, we take a trip through history. Please also visit ROBOTMAK3RS Community every week as we highlight different projects all through 2023 in celebration of the anniversary. Some of the early history is based on the content shared by  Coder Shah  in our  MINDSTORMS EV3 Community Group . Some of the text and links may have been edited from his original posts for consistency and clarity.  1984 - Kjeld Kirk Kristiansen watched a TV program called "Talking Turtle," where MIT professor Seymour Papert demonstrated how children could control robot "turtles" using LOGO, a programming language he developed. 1988 - The collaboration between MIT and LEGO resulted in LEGO TC Logo in 1988, which allowed students to control LEGO models using computer commands. The video shows Papert demonstrating TC Logo. 1990 - LEGO TC Logo was hampered since the robots you built had to be tethered to a personal computer. LEGO and MIT

Celebrating MINDSTORMS with a Remix Part 1

In honor of the 25th Anniversary of MINDSTORMS, we asked ROBOTMAK3RS to combine a LEGO set of their choice with a MINDSTORMS set. Here is what these five ROBOTMAK3RS came up with.  MINDSTORMS Chess Assistant by Arvind Seshan Overview: When you are new to chess, it can be a challenge to remember which pieces go where. Now, you can use machine learning and LEGO MINDSTORMS Robot Inventor to build a tool to help you learn where all the chess pieces go on the chess board. Sets used: LEGO® Iconic Chess Set (40174) and MINDSTORMS Robot Inventor (51515) Review: I really like how the chess set base can store all the pieces underneath and that the board neatly splits in half for handy storage. The chess pieces themselves are very sturdy and well built. My only criticism is the building of the box itself. It was quite difficult to see what pieces to use and since the entire box is made mostly of thin plates, it took a lot of time and patience. I would have liked the storage area to be sliding dra