Ping = lego?
roughwire
Posts: 78
Yup it's me again... I got by on some other things but now I need some help wireing up this Lego Ulrasonic sensor to my bs2 (board of Ed), But the wireing's not the same. PING's got 3 wires (RED, WHT, BLK) and this Lego's got·six (WHT, PRP, RED, GRN, YLW, and BLU)... How can I wire this up? Here's a pic... THX.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
MIKE
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
MIKE
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
MIKE
seems to indicate the Lego Ultrasonic is I2C communication based. It also looks like it's using 2 wires, not 6, but I haven't found a wiring diagram yet.
I still say a Ping sensor would be cheaper and easier to interface, if you want to go that way.
Post Edited (allanlane5) : 1/22/2007 8:05:56 PM GMT
See I2CIN and I2COUT in the Stamp manual for examples. For the Lego Ultrasonics it *appears* that the device address highbyte is always $02 (hex 02) and then the lower byte is the register you want to read/write. You might want to start with just trying to read the version number of the device so you can verify that the device is online and you can communicate with it.
I do think this device is a bit more complex to use than a Ping))), and doing it on a BS2 would be more involved since I2C is not native on the BS2. But if you were using it with a BS2p (native I2C support) then it looks like the device does some pretty cool things. In particular the "event" capture, where the unit will not take a sonar ranging unless it can not detect *other* ultrasonic noise in the vicinity, and the captures where it will record 8 data bytes of ranges to 8 objects. Some experimentation would certainly be in order, I'm sure.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST