Loginskip to content

NXT Repository/Programming/Alt.NXT-G/

Anything which is alternative to programming your NXT using LEGO’s NXT-G…

Search under this category:

Sub-categories:

Contributions:

Analysis of NXT Bluetooth Communication Protocol

Last update: Thursday, October 5th, 2006

Sivan Toledo published this detailed analysis of the NXT BT protocol.

Controlling NXT from MathWorks MATLAB

Last update: Tuesday, November 28th, 2006

matlab_logo.gif

Gregory Gutt has developed a software package to control the LEGO Mindstorm NXT using Bluetooth, RealTerm and MathWorks MATLAB software. MATLAB is a high-level language and interactive environment that enables you to perform computationally intensive tasks faster than with traditional programming languages such as C, C++, and Fortran. Gregory developed this for the George Mason University Neural Engineering Laboratory.

You can download the readme.txt file here, and the whole package here.

FantomTalk

Last update: Saturday, December 23rd, 2006

FantomTalk is a new package developed by Gregory Gutt to control the LEGO Mindstorm NXT.

FantomTalk is simple NXT terminal program based on the Fantom API, provided by LEGO. FantomTalk supports all documented “Direct Command” communication between a Windows PC and a single NXT via Bluetooth or USB.

(more…)

iCommand v0.4 — Java NXT Programming

Last update: Saturday, September 23rd, 2006

Plenty of NXT development news this weekend.

If Java programming is your fancy, you’ll be thrilled to hear that Brian Bagnall’s iCommand v0.4 is now available. iCommand allows you to control your LEGO Mindstorms NXT with Java over a Bluetooth connection. No custom firmware required. Best of all, it works with Windows, Macintosh, and Linux systems. It’s all very well documented, too.

New features include:
- Full Windows support and preliminary setup instructions for Mac OSX and Linux.
- I2CSensor and UltrasonicSensor support.
- Changed API so it duplicates architecture of leJOS API (static calls).
- iCommand now reads the COM port using the environment variable NXTCOMM.
- Fixed bug in Motor.stop() so it now stops dead instead of floating.
- Added an NXT class with methods for brick name, running Lego executables, checking versions, checking memory.
- Added a (bad looking) GUI app called NXTDirect for controlling motors and sensors in the samples directory.

Download this archive for API documentation, samples, and instructions. Thanks for the forum post, Brian!

LejOS: Alternative Firmware to run Java on the NXT

Last update: Sunday, January 14th, 2007

leJOS NXJ is a full firmware replacement and works for Windows and Linux. This is a technology preview of things to come. At the moment there is no Bluetooth, I2C (Ultrasonic sensor), or sound support and we do not have a basic menu system. You can write Java programs and upload them to the NXT brick via USB.

LiNXT - Linux to NXT Communication

Last update: Thursday, September 21st, 2006

There’s a neat new project in the works called LiNXT that allows communication between the LEGO Mindstorms NXT and Linux via USB.

This communication includes downloading files from, and uploading files to the brick; retreiving device information, including the firmware and protocol versions, the bluetooth address, and the amount of free flash memory; listing the files on the brick; and getting the current battery level.

The Perl source code is available on the project site on Google Code under Artistic License/GPLv2. Check it out!

Thanks for the email, Ben!

Making Music With NXT Melodies

Last update: Tuesday, October 24th, 2006

Introduction

I want to first thank Eric and Guy for letting me join the nxtasy team. I’ve been impressed for quite some time by the amazing content and community being built here and I wanted to be a small part of it.

And now on to the subject at hand - making music!

Playing Sounds

A very popular feature of the standard NXT firmware is the ability to play wave files which have been converted into NXT sound files (with an .rso extension). The NXT software comes with many sounds which can be used in an NXT-G or NBC program with the standard NXT firmware to make your robot sound cool. Using a wave file to NXT sound file conversion utility you can easily create additional sounds for use in NXT-G and NBC programs.

Unfortunately, even though NXT sound files are fairly low quality (8-bit, mono, 8k sample rate) sounds, they can take up large amounts of flash memory when they are used in a program. The “Writing Efficient NXT-G Programs” pdf document on the First Lego League website recommends that you “minimize use of Sound and Display blocks” in order to more optimally use the available flash memory. With flash memory limited to around 128 kilobytes it can be very important to pay close attention to how much space is taken up by sound files.

(more…)

MindSqualls .Net API

Last update: Wednesday, February 7th, 2007

MindSqualls is a .Net 2.0 library for remote controlling a NXT robot through a bluetooth link.

It is written in C#, but can be used from any .Net programming language e.g. VB.Net, J# and of cause C#. It can also be ported to the Compact Framework allowing it to be used
on a Pocket PC, smartphone or PDA as long as they can run the CF.

MindSqualls is currently in version 1.1, and supports all the commands from appendices 1 and 2 of the Bluetooth Development Kit. Furthermore it supports the compass and color sensors from HiTechnic. It gives the programmer either a direct bluetooth communication
object (the class NxtBluetoothConnection), or a high level abstraction through the class NxtBrick.

MindSqualls is available for download at http://www.mindsqualls.net.
It is of cause free and it comes with an extensible documentation.

MS Robotics Studio September 2006 CTP Released

Last update: Saturday, September 16th, 2006

Microsoft Robotics Studio sees an updated community technology preview for September. New hardware support, simulation tutorials, and programming and service improvements are included. One of the tutorials provided with the installation demonstrates how to enable remote drive-by-wire via MSN Live Messenger (shown above).

The online tutorials section gets an update, as well, with robotics and Visual Programming Language lessons. Enjoy.

NXT Director

Last update: Thursday, February 8th, 2007

NXT Director (v. 1.1) allows to use your Bluetooth enabled Palm device as a remote control for your Lego Mindstorms NXT Robot.

NXT Life

Last update: Sunday, October 29th, 2006

Based on a comment in the nxtasy forums about a version of the Life simulator written in NBC that was unusably slow, I decided to try my hand at writing a speedier version.

The original code is written by forum user bk227865. He kindly shared a copy of his code with me and I started ripping it apart and building it up again. Originally, the program kept an array of bytes with 6400 entries which was used to mark whether a pixel on the screen was a live cell or a dead cell. A faster way to implement Life is to just keep an array of live cell indices. This will generally be a relatively small array which can be used to paint the screen very quickly.

After a generation has been drawn on the screen then a new array is built containing all the live cell indices from the previous generation plus all their neighbors which may become live in the next generation. This next generation array is then processed to count how many live neighbors each cell indice has. I can think of a way to optimize this further to make it even faster at calculating the next generation of live cells, but I’ll leave that as an exercise for the reader for now. :-)

In my version of NXT Life with a glider and a blinker on the screen, like in bk227865’s original code, each generation takes a little less than 0.8 seconds to draw. When the glider intersects the blinker and additional live cells appear in subsequent generations the time it takes to calculate the next generation increases.

The program uses a macro called MakeCellLive to draw the first generation state. If you want to try other Life shapes you can modify this section of the program.

You can get a copy of Life on the NBC Samples page. It’s the first item on the page. I also posted it to the nxtasy forums.

NXT Tic-Tac-Toe - No Motors, No Sensors!

Last update: Saturday, October 21st, 2006

Ross Crawford has whipped up a version of Tic-Tac-Toe on his NXT using NBC - with no sensors or motors… Why bother when you can do it right on the screen? Right?

screen.jpg

Well, I’ve been playing a bit with NBC on my NXT lately, and the first program I like to write in any new language is Tic Tac Toe, so here is my NXT version. You are always “X” and have the first move. NXT plays for the draw, but will win if you stuff up! Use the arrow keys and enter key on the NXT to play.

NXTBrowser - Bluetooth Connectivity on an Intel Mac

Last update: Wednesday, December 6th, 2006

Forum member, Spirou, has posted information on a new application that allows the browsing of the NXT-Filesystem via Bluetooth from an Intel Mac.

Features:

1. displays battery status, available memory and firmware version
2. changeable brick name
3. upload multiple files to the NXT
4. download multiple files from the NXT
5. run / stop programs
6. play sound files
7. file filters

The Universal Binary is available for download. Provide comments to the forum post or directly to carstenm@mac.com.

nxtC, a C-like language for the NXT (with an IDE)

Last update: Saturday, November 11th, 2006

A taste of nxtC

Phillip van Eeden developed a C-like language for the NXT, along with an IDE, called nxtC.

I only had a brief chance to try it, but here is Phillip’s list of the main features of nxtC:

  • Functions can be multilevel. There can be functions in functions (like Delphi).
  • Library of functions that only compile functions that are used. The library can be pre-compiled and encrypted.
  • Classes with inheritance. Classes can be multilevel (classes in classes).
  • NBC assembler functions can be directly used in a function.
  • Fantom driver functions are integrated in the IDE and can be programmed from the PC.
  • Bluetooth implementation for downloading and communication with the brick.
  • More than 10 program flow structures and programming syntax enhancements.
  • The compiler translates nxtC programs (text files) into NBC files (*.nbc) - to be compiler by nbc.exe


Any additions/suggestions/comments? Send an email to repository@nxtasy.org.