Mar 1, 2007

New Blocks & Pinging the US sensor


Steve Hassenplug has just put up two more nice custom blocks developed using the LabVIEW Toolkit. One is a block that will take the output of a NXT-G timer (a number of milliseconds) and display it on the LCD in terms of minutes and seconds. The second was developed by Steve and a wider group of folks bouncing ideas off each other. It is a bitwise logic block, that will perform binary operations on numbers (instead of just logical wires), such as performing an AND between two numbers, etc. This can be really handy for dealing with low-level things on the NXT. Visit Steve's NXT page for these and actually a whole lot of other custom blocks: line following blocks, display blocks, array blocks. Take a look. To install these blocks, you need the dynamic block update installed (there's a lot of other good updates on this LEGO page, check them out).

Another fun thing that has come out is a tutorial from Guy Ziv over at NXTasy about how to use the I2C read/write blocks to "ping" the US sensor, allowing it to be used in an on-demand fashion. He also discusses ways to access some of the deeper functions of the sensor, such as the ability of it to return not just the distance to the nearest object, but essentially the distance to the nearest eight objects. Those I2C blocks open up a lot of deep calls into the NXT digital sensors.

"and, uh, get the machine that goes... ping!"

--
Brian Davis

11 comments:

msim said...

Where can you download the I2C block?

Brian Davis said...

The I2C blocks can be downloaded from the NXTasy repository (there is a link in guy Ziv's article), but I think they originated over at the Mindsensors site. They're quite handy, in that they allow me to access a number of sensors in a "deeper" way while sticking with the ease of use of NXT-G.

--
Brian Davis

Matthew Dyer said...

sorry for the beginner question, how do you actually install the blocks? I have the dynamic block update but when i download them i just get a "file" not a normal folder. can you help?

Brian Davis said...

You have to tell the NXT-G software to install the blocks. Start up the software and open a project (a new blank one would be fine). Once the project opens, go up to the "Tools" menu, and if you have the dynamic block update installed you should see an option to import/export blocks. Select that, and in the dialog box that follows browse to the folder of blocks you with to install, and install them (you can select which pallet to put them under as well). Note that once you have a list of block to install in the dialog box, you need to select the blocks form the list that you wish to import (you can import all or just some of them, if you choose).

--
Brian Davis

Matthew Dyer said...

Yes, when i try that the search for blocks just comes up with nothing. Ive installed the compass and colour blocks before fine, but these two are different. Thanks anyway.

msim said...

Yeah, Ive tried it to. It doesnt give you a folder to download, it just gives you a single file. And, it seems as if you cant import single files.

Anonymous said...

You download a zip file. Open this zip file, click on 'File' > 'Extract All...' > 'Next' then note the path to the folder (directory), click 'Next'. For IIC Read a IIC_Read folder is created and IIC_Write for IIC Write. In NXT-G run import/export tool, browse to the folders you just created (you can only import one at a time).

Brian Davis said...

Also, make sure that the name of the folder has not been changed. For instance, if you download a file more than once on the Mac, it obligingly names something like 'my file', 'my file - 2', 'my file - 3', etc. Trying to import anything other than the first version will cause NXT-G to hiccup (I think), so make sure your helpful operating system isn't renaming things behind your back (possibly; I'v enot tested this as the source of all problems, but it's something I've stumbled on a few times).

--
Brian Davis

JC said...

NXTasy is dead, does any body have a copy of the Ping program?

JC said...

Nzxtasy is dead, does anybody have a copy of the ping program?

JC said...

nxtasy is dead :( does anybody tutorial from Guy Ziv for using the US to ping? thx

Related Posts Plugin for WordPress, Blogger...