Monday, October 01, 2007

New Lego Technics download book

Hello,

I am Yoshihito Isogawa, author of "LEGO MINDSTORMS NXT The Orange Book".

I would like to inform you of my NEW book "LEGO Technic Tora no Maki"
which is provided as a PDF file and is released on October 1.

Only the first three pages have any text in this book. From the fourth page, there are only pictures and numbers. That means the book can be used by children who cannot read yet and by people who can't read Japanese or English.

See the following website for more information about the book and download method.

http://www.isogawastudio.co.jp/legostudio/toranomaki/en/



I hope you will enjoy with my book.


Yoshihito Isogawa

Wednesday, October 18, 2006

NXT Laser

NXT Laser

Kevin Cook has a great new page that shows how to put a laser pointer inside the casing of a light sensor. This allows you to have the robot "shoot" targets, or generally be cool. The how-to is easy to follow, and doesn’t take advanced electronics knowledge. Just make sure that the robot does not point the laser in your eyes (or the eyes of anyone nearby)!

Do not stare in the laser

Perhaps to avoid confusion: this is a laser pointer, not a laser ranger. You cannot measure the distance of obstacles using this NXT laser.

Filip

Me and My GoogleRank

Hi everyone.

Let me first apologize for my long disappearing act. My daughter Norea is just a lot of fun, and a lot of work. I certainly would seem nice to be a stay-at-home dad. But my startup business is a lot of work too. And between those two, there just has been too little time to spend on NXT. But there is no lack of ideas I'd like to see working for the NXT community (and robot creations).

One other thing: bNXT isn't really ranking very high on Google. Perhaps I need to do more search engine optimization, but it would be really great if more people could put up a permanent link to this site. Not just other blogs, but everyone who has a webpage. There's nothing like having your articles show up on Google to motivate a person to write :-).

Thanks,
Filip.

Monday, September 11, 2006

Norea Verhaeghe

On September 8, my beautiful daughter Norea was born. My duties as a first time father are taking up all of my time right now. Sorry to everyone whose mail I haven't answered (in fact, haven't received) yet. I'll be back in the not too distant future.

Filip.

Wednesday, September 06, 2006

My Number 1 Feature Request for NXT-G

After playing around with NXT-G for some time now, I have grown to like it. It is very powerful, but sometimes you need to be able to go just a little bit deeper. Those are the times when development languages like NXT Byte Code (NBC) is really useful. Unfortunately, you cannot use NBC code from within NXT-G.

So my #1 feature request for NXT-G would be:
  • a NXT-G block that allows you to embed NBC code (best way because it brings the code right into the NXT-G environment), OR
  • a NXT-G block that allows you to issue so-called "direct commands" to the firmware (as specified by the NXT SDK), OR
  • a NXT-G block that allows you to run an external program.
In all cases, there should be some way to pass parameters to the block or to the external program.

With that feature, one can build almost any other brick without using LabVIEW. For instance, building custom blocks that support custom sensors would be extremely easy. So my requested block is a block with which I can build any other block.

But perhaps you'd like something else. What is your most wanted NXT-G update?

Wait For Ultrasonic And Touch Sensor

Everyone in my family just loves to play with LEGO MINDSTORMS NXT (yep, I have taken it to family meetings). But I noticed that my nephew Mathijs, who is 14 years old, struggles with using two sensors at the same time.

In particular, using both the ultrasonic sensor to detect obstacles, and the touch sensor to act like a bumper, proves to be pretty challenging. Frankly, this is a piece of code I have debugged for myself also multiple times, so I decided to create a My Brick that captures this functionality, and make it available as a download.

BRICK DESCRIPTION

(download link near bottom)

What the “Wait For Ultrasonic And Touch Sensor” brick does

 The sensor will wait until either the Ultrasonic sensor has detected the selected range, or until the touch sensor is pushed. It will return the value 1 if the Ultrasonic sensor has detected the selected range, it will return the value 2 if the touch sensor was pushed, and it will return 3 if both events happened together.

Configuring the brick

  • You need to provide the ports to which the touch sensor and the ultrasonic sensor are connected.
  • For the ultrasonic connector, you must also specify the trigger point. This is the distance that the ultrasonic sensor is responding to.
  • If you want the ultrasonic to trigger when it comes too close to an obstacle, check the "Trigger If Closer Than Trigger Point" box. When this box is unchecked, the ultrasonic sensor will fire when there is no obstacle between the robot and the trigger point distance.

Sample Application

In this sample application, the robot has an ultrasonic sensor at the front, and a bumper at the back.



This application will drive forward until the ultrasonic sensor detects an obstacle closer than 30 cm. When that happens, it will drive backward and turn until the obstacle is further than 50 cm, or until it bumps into something with the rear bumper. Then it will start to drive forward again.

With this simple program, the robot can navigate the room and avoid obstacles and walls.

Sample Application 2

In this second sample application, we'll make things a little bit more complicated. This time, the bumper and the ultrasonic sensor are both at the front of the robot. When the bumper is pushed, then some obstacle did not get properly detected by the ultrasonic sensor.

We want the robot to drive forward. When the ultrasonic sensor sees an object, then it should simply turn a number of degrees to avoid the obstacle. But if something hits the bumper, it may be blocking the robot. The robot may not be able to turn. Therefore, the robot should first drive backward, and then turn. Here's the program that does this:

sample program 2


Here's the setting of the switch (if-then) statement:

switch settings


Notice that I have set the second option as the default option. That means that if both the ultrasonic and touch sensor fire at the same time, then we will respond to the bumper and ignore the ultrasonic sensor.

Download

There are two versions for download: one expresses the trigger point in centimeters, and the other in inches.
  • Download the "Wait For Ultrasonic and Touch Sensor" brick where the trigger point is expressed in centimeters;
  • Download the version where the trigger point is expressed in inches.

Installation Instructions

  • Download the brick using the link above.
  • From within NXT-G, go to the Edit menu, and select the Manage Custom Palette submenu. A directory opens.
  • In this directory, create a directory bNXT if it does not already exist.
  • Next, copy the downloaded brick from the downloaded zip file to the bNXT directory you have just created.
  • Now close NXT-G completely.
  • When you restart NXT-G, the brick will be available in the custom bricks menu (third palette down).

How it works

The program of this brick can be seen by double clicking the brick after installation. I encourage you to do so, and perhaps make your own variations.

Tuesday, September 05, 2006

My Block Bug in NXT-G Editor

I discovered the following bug in the NXT-G editor. If I create the following program:

Buggy program


With this prorgam, I take the screen block (right block) and I turn it into a My Block. The next time I want to use this My Block from the custom palette, the NXT-G editor will crash:

Buggy program


The bug is not in the execution of the program, but in NXT-G editor itself. I (unfortunately) discovered this bug as part of a larger My Block. I was able to confirm the bug on several computers. I have not been able to find a workaround yet, suggestions are very welcome.

bNXT in Chinese

bNXT has started a blog in Chinese. I believe it is the first blog in Chinese dedicated to LEGO MINDSTORMS NXT. Jason Yu will be responsible bringing posts to that blog. You can also reach the blog via the menu above.

I can read English, Dutch and French, but I do not speak or read Chinese myself, so please don't send me emails in Chinese. You can contact Jason at jason@bnxt.com.

NXT Course Curriculum

Today, I receive this question, and I hope you can help out:

Hello, I teach Industrial Electronics. I'm not new to electronics but I am new to teaching robotics, we are starting a intro to robotics course and lab this spring, I'm super excited about that. The original equipment was going to be one industrial robotic arm and 15 lab seats of simulation software, but after searching the web it seems that alot of schools and universities are using the lego mindstorm kits. I did some research and found that it would be cheaper to have 15 of this kits than one arm and sim software. I believe the students would learn more with these hands on kits. So my question is: "Is there a Curriculum built around the NXT? (Books, Lab Manual, Software Training, Videos, etc...)"

So that you know I'm not lazy, just really busy, I teach days and nights, and I'm dedicated to my work, I even when down to Toy's R Us and bought a set of commercial NXT for myself out of my own pocket, so that maybe I could create a course, I'm sure I can get the basics, but I really want my students to have the best.

Also if there is no such course curriculum, I'll be glad to help anyway that I can with an existing group, or start a group to create one.


Please leave comments to this blog if you can help out in any way, or would like to help with a group on building an NXT curriculum.

Monday, September 04, 2006

Custom Icons for Custom NXT-G Bricks

Using the NXT-G My Block feature, you can make your own bricks (equivalent to “functions” or “procedures” in traditional programming languages). You can learn how to do that here.

Part of the process is to select an icon for your My Block. To do this, you can select from a set of predefined icons, and you can combine those icons. But if you are like me, you’ll want to create your own icons for your blocks. And although not documented or supported, LEGO has put everything in place to do just that.

Suppose you want to create a My Block like this one:

Sample brick


The first thing you will need is to create an icon. The icon must be a transparent PNG file of dimensions 32x32 pixels. Amongst others, you can use the free software Paint.NET to create this kind of images. Make sure to use a transparent background, so that you can combine the icons with other icons you create.

For this particular sensor, I made two icons: one that just reads bNXT, and another with a compass rose. Then, I placed the two icons in the directory “C:\Program Files\LEGO Software\LEGO MINDSTORMS NXT\engine\Icons\MyBlock”, as seen in the next image:

My Block Directory contents


The next step is rather traditional. When I now start the NXT-G software, and I create a My Block, I see my two icons in the list of icons to be used:

My Block Builder


I simply superimposed the bNXT icon over the compass rose icon, and that was it. As you might have noticed, the My Block Builder shows the content of the “C:\Program Files\LEGO Software\LEGO MINDSTORMS NXT\engine\Icons\MyBlock” directory in alphabetical order, but it only shows the first 72 icons in the directory. That’s why LEGO uses their own naming/numbering system for the icon filenames that allows them to alphabetically sort the blocks. My blocks just sort of fell in between those, bumping out the last two blocks. So make sure that when you add your own blocks, your filename is within the first 72 files, alphabetically speaking.

Lucky for us, LEGO has decided to store the icon inside the .rbt file that stores your My Block. The icon travels with the My Block, and you can freely pass along your .rbt file. While the .rbt file is on your own computer, you can still edit the icon at any time. After copying the My Block to another machine, the original PNG files are no longer available on this new machine, and the icon can no longer be edited (but the program inside the Block can be opened and changed).

PS. The movie on the Compass correcting slippage post has finally been published by YouTube. Click here to see it.