Search under this category:
NXT Repository/Programming/
Comparison of Programming Environments for NXT
Last update: Tuesday, November 13th, 2007The winter issue of Robot magazine contains a comparison of the various programming solutions for the NXT. It’s available online at http://www.botmag.com/articles/10-31-07_NXT.shtml. The comparison includes implementation of a simple line following program using the different programming languages including screenshots from the different environments. [Note: I wrote the article and also helped author ROBOTC].
Another NXT programming language discussion was justed posted on the Wired magazine web site at http://blog.wired.com/geekdad/2007/11/the-best-progra.html. Chris Anderson of Wired has been using his NXT to control his UAV — Unmanned Aerial Vehicle — and has tried many of the programming environments. For more on his airplane, see the videos at http://diydrones.com/video/video/show?id=705844:Video:43
Getting Started with NXT Byte Code (NBC) Programming
Last update: Thursday, August 3rd, 2006Filip Verhaeghe posted this nice tutorial on how to work with NBC. Good point to start if you know nothing on NBC….
GPS with RobotC
Last update: Sunday, September 16th, 2007
Dick Swan, the developer of RobotC, sent me a sample code for using a BT GPS with NXT using RobotC. The code can be downloaded here. As one can see in the image, it displays time, position and other data on the NXT LCD display. This code requires a RobotC version which is still not public, which can be rechived directly from Dick Swan (dickswan at sbcglobal dot net).
How easy is it doing GPS communcation with RobotC? Well - very easy. You first turn the BT to ‘Raw Mode’ by setBluetoothRawDataMode() command. Then you simply read data (say one char) from the BT like a regular serial port with nxtReadRawBluetooth(BytesRead[0], 1). The rest of the code is GPS specific message parsing etc.
I was also astonished how easy is it to connect BT device programatically in RobotC. The three lines at the end of the code:
setSessionPIN(”1234″);
bBTSkipPswdPrompt = true;
btConnect(2, kGPSName);
Is all you need! It defines the PIN code to use, tell the NXT not to show password dialog and connect to a preset device (given by a const string kGPSName).
Any additions/suggestions/comments? Send an email to repository@nxtasy.org.
Search
Categories
Monthly Archives
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006