|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
I2C for NXT sensors
I've been told that the I2C on the Digital Sidecar is compatible with the NXT sensors (or at least the connector is).
Today I tried it with the Ultrasonic Sensor. I made a For loop to try every one of the 256 device addresses, and none of them worked. I realize that the NXT I2C is slightly different from standard I2C, but I can't even open a reference? How is the NXT I2C meant to work? |
|
#2
|
||||
|
||||
|
Re: I2C for NXT sensors
I don't have any experiance using the I2C on the robot, but you may want to start by reading the code for the HiTechnic Compass.
|
|
#3
|
|||||
|
|||||
|
Re: I2C for NXT sensors
Last year, (team 809) got a HiTechnic Compass working over I2C using the built-in code (if I remember, we had to modify it a bit, but the general connection premise is there.)
Jacob Edit: W00T post 1234!!! |
|
#4
|
||||
|
||||
|
Re: I2C for NXT sensors
I looked at a bunch of the hitechnic code, and the all seem to use the same template.
I still haven't managed to get a single reply from it. When I'm reading data from a device, I write to it and read from it, but this is all done in the "I2C read" VI, correct? What is the "Data sent high"? |
|
#5
|
|||
|
|||
|
Re: I2C for NXT sensors
The ultrasonic sensor that Lego sells is not actually I2C compatible. It will not work with the Digital Sidecar. All HiTechnic sensors that have been tested have worked with the Digital Sidecar.
|
|
#6
|
||||
|
||||
|
Re: I2C for NXT sensors
... ok, the Lego ultrasonic may not be I2C compatible ... what about the other ones? Are any of the Lego NXT sensors I2C compatible? I'm primarily curious about the Light/Color sensor.
|
|
#7
|
||||
|
||||
|
Re: I2C for NXT sensors
The light sensor, sound sensor, and touch sensor are all analog.
(however, the touch sensor has only two states: on (4.3v) and off (0v)) If you would like I2C compatible sensors, hitechnic.com has a wide selection. (They even have LabVIEW code that you could convert to work with the cRIO) |
|
#8
|
||||
|
||||
|
Re: I2C for NXT sensors
I've looked at the Hitechnic website ... nice stuff in there. I just thought I'd ask since I'm in possession of an NXT kit, and would have to order one from Hitechnic.
Are the Analog specs available for the NXT sensors? When I've used the color sensor on my Lego kit, the sensor was always within an inch of the ground. I wonder how it'd perform if it was more like 4-5" high ... |
|
#9
|
|||||
|
|||||
|
Re: I2C for NXT sensors
I have had much more experience with the RCX light sensors and their weaker LED, but my guess is that it will become much more sensitive to changes in ambient lighting conditions as you move it off the ground.
|
|
#10
|
||||
|
||||
|
Re: I2C for NXT sensors
Try looking in the NXT hardware developer kit. (it's a PDF)
I was going to give you a link, but I couldn't find it. I thought it was somewhere on the LEGO site. Here's a pdf-javascript version hosted on another site: http://www.docstoc.com/docs/20929335...-Developer-Kit |
|
#11
|
|||
|
|||
|
Re: I2C for NXT sensors
The light sensor, sound sensor, and touch sensor are all analog.
(however, the touch sensor has only two states: on (4.3v) and off (0v)) If you would like I2C compatible sensors, hitechnic.com has a wide selection. (They even have LabVIEW code that you could convert to work with the cRIO) |
|
#12
|
||||
|
||||
|
Re: I2C for NXT sensors
If you have the LabVIEW toolkit for NXT, it shouldn't be hard to make a data logging application.
I think the voltage out from the light sensor is directly proportional to the intensity of light in, but I wouldn't count on it. (I don't even know whether that's on a logarithmic scale or not) I do know that the value back from the "light sensor" VI is directly proportional to the voltage in. Your best option really would be to make a jig and do repeatable tests. (If you want to do some advanced stuff, you could even use the Direct Control VIs) |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| i2c output | virtuald | Programming | 16 | 18-01-2009 19:20 |
| LabVIEW with NXT sensors | gabrielse | National Instruments LabVIEW and Data Acquisition | 13 | 05-01-2009 02:02 |
| special NXT Licensing for FLL? | Joohoo | Lego Mindstorm Discussion | 0 | 07-08-2008 19:55 |
| I2C tutorials | John Gutmann | Electrical | 3 | 30-07-2005 10:44 |
| I2C? | John Gutmann | Electrical | 3 | 19-07-2005 22:52 |