John Hansen and I created a way to start programs that run on the bare metal (directly controlling the processor) from an almost-standard firmware.
If you ever wished to program the NXT at the lowest and most powerful level, but did not want (or could not) deal with SAM-BA, the native boot loader, then this project is just what you were looking for you. You will be able to build C programs using the free GCC compiler suite and run them on the NXT. When the program terminates (or when you press the little reset button hidden in the Technic hole below the USB socket), the NXT returns to the standard firmware. You never lose the ability to download and run a NXT-G or NXC program. You can learn a great deal about embedded programming by trying this out.
Perhaps more importantly, if you are the developer of a programming environment that normally gets installed on the bare metal, this project would be useful for you too. It would allow users to invoke your programming environment from the (almost) standard firmware.
The complete details and code to get you started are available here. The code includes a small set of device drivers that currently support the motors, analog sensors, the key pad, the display, and sound.
I’ll try to support the code on the Software Forum here at nxtasy.org (but feel free to send email if I don’t respond).
As many of you know NXT-G is built upon LabView. This means that everything possible with LabView and the NXTToolkit can be encapsulated into an NXT-G block. Doing so, however, is usually hard work (especially if you want to do it right, i.e. have good control panel and icon drawing interface).
Here’s a project in progress. A few weeks ago I looked into the internal of the toolkit VI ‘Write Message’ which send BT string from master to slave devices and vise versa:
when you go deep into the internal codes (here’s one good use for the NXTToolkit. Unlike regular NXT-G implementation VIs these VIs are not password protected!) you find that for master BT devices the message string is converted into a ‘BT packet’ by this code fragment:
As some may recognize, this is a Direct Command message format. The 0×80 0×09 start means BT Write Message telegram w/o reply (unfortunatly the master BT can’t request reply, since the firmware does not support it. If it could, there’ve been many more possible uses for the kind of “trick” I show here). It then adds the mailbox, the message length and the message itself. All this is converted into a byte array and sent over BT using a VI called ‘BT Write Buffer’ (not shown).
Having seen this, I started thinking - what if I send other Direct Command telegrams from the master NXT to a slave NXT? As I said earlier, only non-reply telegrams are possible. Among the possible telegrams is the ‘Run Program’ command (0×00 command). Indeed, if I have a program called ‘remote’ on the slave NXT running the following code on a master NXT executes ‘remote’:
As I said in the beginning, this can be cast into an NXT-G block which can either run a program by name on a connected NXT, or stop the current program (0×01 Direct Command). The question is - will it be useful for anything? I will be happy to get your feedback on this at this forum topic.
I think long ago some MCPs were playing with a similar concept, but I never saw real results. This guy did a very nice job, combining NXT and Bionicle in a very convincing way. I wonder how far it can go - adding maybe US to each horse, and maybe sending BT messages between the two?
“Creating Cool Mindstorms NXT Robots” by Daniele Benedettelli has come out with some delay. The author and editor’s wise decision to take their time to do this book has purified the contents and enhanced its quality… which can be only described with the attribute : excellent !
Danny has developed a handful sophisticated LEGO robots to which he gave life through control- and behaviour-based programs. The reader is led through slowly growing degrees of difficulty and complexity from “Quasimodo” to “JohnNXT”, while learning about the essence of NXT C-programming and concepts as diverse as finite state machine, hysteresis, underactuation, line following, Boolean operators, decision tables… All these topics are well-woven to form a balanced patch-work of knowledge that has characterized so many good robot books. You consequently learn by doing.
The author astutely combines NXT-programming with remarkable LEGO studless building in order to realize and describe more and more complex robots. With a note of humour the reader is accompanied through all the designs, where he has the impression of participating in the development of each prototype, which definitely is one of the best didactical choices. The graphics of this book are of high quality.
The absolute high-light of course is JohnNXT, the LEGO incarnation of the famous “Short circuit”-movie robot. Daniele uses two NXTs (pardon : three!) for this project. Two NXTs control the robot and communicate with each other over the RS485 high-speed connection. A third NXT is used in a “Remote Control” project and sends its commands via Bluetooth to the robot. But JohnNXT also can survive quite autonomously through a behaviour-modelled program.
Here is an interesting robot from wayneage that plays Pong using a NXTCam camera to track a ball in real time. The NXTCam continuously sends the location (coordinates) of the ball to the NXT brick. The robot keeps adjusting its position to hit the ball when it is close enough. Before the robot starts, the NXTCam is taught the colours to track using another program called NXTCamView (this is not shown in the video). As you can see it works quite well - nice work!
Here’s a great project by John Brost. Inspired by Steve H. ‘Green Monster’ he built this model, which also uses Bluetooth GPS (and RobotC) to navigate around.
Voyager uses a 3-motor articulated steering design - one motor drives both wheels on the rear axle through a differential and the front wheels are driven individually by the other two motors. It also has a compass sensor and a GPS connected via bluetooth.
btw. Technically it IS possible to build a BT GPS NXT-G block. There’s a lot of work involved, and very little potential users. If anyone is interested, email me. I’ve posted a few posts on GPS in NXTasy, and since some implementations do work in NXC (under standard firmware) they can be ported and wrapped into a NXT-G block (but with a lot of effort).
Guy Ziv
posted by guy at 12:38 am. filed under: projects, news
Congratulations to GREEN MAN GROUP who scored 3 perfect 400-point runs at the FLL World Festival this April 16th-19th. They received the 1st Place Performance Award. GREEN MAN GROUP is a part of The New England Robotics Designers - check out their website here.
Here is a link to the World Festival awards page, featuring a picture of the team and their robot.
Josh
posted by Josh at 11:31 pm. filed under: news, events
Here is Little Joe, a biped walker. He was inspired originally by the work of Joe Nagata, but the feet are probably the only bit of Joe’s original that survives.
Little Joe has a pretty smooth and reliable walking action going on which you can see on video here. I’m very pleased with how he turned out. Just wish I’d got him finished in time for the NXTlog competition!
There’s not many instruction sets for bipeds out there (or not that I could find anyway). Hopefully this LDD file will come in useful.
If anyone does build Little Joe, I’d love to hear how you get on…
posted by TooMuchCaffeine at 3:38 pm. filed under: news
I was inspired by a NXT robot called RoboDog to build a four-legged critter. I ended up building it without the NXT, but I it still came out cute. I used the Power-Functions battery box and receiver, as well as a Power-Functions motor to rotate the head. But the legs are powered by an RC Buggy 9V motor, which is connected to the Power-Functions receiver by an extension cable. Click the picture for a video.
There’s a new pbLua version Beta14n that fixes a few issues in the file system, as well as adding a new function called Checksum() to sum the characters in a string.
The file system tutorial has a section at the end that shows you how to automatically run a Lua file on power up with no intervention and no console attached. That would have been handy for the UAV project…