Many around!
a big comparison table can be found here.
FIRMWARE:
The language coming with the NXT is the FIRMWARE of Lego. Programming is done with drag and drop of elements. With this language the basic functions can be explored. It gets more interesting when you make your own blocks, but in the end some features of normal programming, like easily introducing new variables is somewhat cumbersome.
Good for: testing.
more about FIRMWARE
JAVA can be done in the Lejos JAVA.
Programming is possible in a text document and compiling and transmitting can be done from the COMMAND WINDOW. But easier is to use a roundabout with ECLIPSE. ECLIPSE is a bit cumbersome to install and link with the Lejos libs, but in the end it is value for money (because it is free :-) and it helps a lot avoiding mistakes in programming.
The JAVA is transmitted to the NXT using USB or Bluetooth, all from ECLIPSE.
description API of Lejos
Koders Very important: the sourcecode of the classes can be found here!
FilIO on the brick in lejos : an example used in eclipse
Lejos Java and the arraylist: an example using an extra class and using the arraylist
abstract classes and a long: building on the I2C abstract class and making a double from a long
There are quite a few limitations, look carefully at this list. (Search limitations)
latest about Lejos and robotics: ebook by Juan Antonio Brena Moral
C++
Dev-CPP can be used too, running on the laptop, using bluetooth actually sending DIRECT COMMANDS to the brick. The libs I used and expanded are coming from Anders. (see Table)
I use Dev Cpp in the console mode for basic testing, for instance of the sensors.
I use Dev Cpp also with OpenGL to be able to draw the environment of the brick (using the sonar sensor).
Microsof Visual C++ works fine too, using his Anders classes, with a few alterations.
an example in C++
An independant and semi commercial lib is the RobotC. This is very nice seeming to run on the brick and the PC at the same time. You can use it a month for evaluation. I continued with the free available libs Dev-Cpp, ECLIPSE and C#, so no further experience. Many examples can be found on the web.
C# of Microsoft Visual Express, can be used, with the lib of Bram Fokke, see table. I have expanded and rewritten this lib and the features of Visual Express, coming free are really great (webbrowser and toolbox for instance, i used this for steering the NXT from the web and from Second Life.)
The modified Bram Fokke steering
| Language | Editor | where? | features | Costs | source |
| Firmware | Lego Mindstorms CD | in Brick | drag & drop (USB bluetooth versturen) | comes with buying the NXT | |
| JAVA/lejos | Eclipse | in Brick | (USB bluetooth versturen) | free | http://lejos.sourceforge.net/ |
| C++ | Dev++ Lid of Anders | in PC/bluetooth | Console/Windows appl (Bluetooth Direct Commands) | free | http://www.norgesgade14.dk/bluetoothlibrary.php |
| C# | NXT C#/ Visual C# Lib of Bram Fokke | in PC/bluetooth | Console/Windows appl | free | Visual C# Express - http://nxtsharp.fokke.net/ |
| | | | | | |
| RobotC | RobotC editor | in PC/bluetooth | runtime debugging, showing all regsiters When RobotC is in the brick, sending bluetooth is hindered | 30$ | http://www.robotc.net/ |
There are other languages like NQC, not quite C and Ruby for instance, i have not done too much with these languages at the moment.
0 comments:
Post a Comment