I am only assuming the sensor is defective. We haven't ruled out ALL the possibilities, but unless you were doing something REALLY stupid (like setting it in paper-clips or staples, wrapping it in aluminum foil, or getting it way too cold or hot) it is probably defective.
One last thing I would do, is test it on another port of another NXT with good batteries, and use a different wire. That would rule out almost everything else all at once.
I don't know the schematic of the sensor, but unless it was working perfectly before, it sounds like the sensor probably has a resistor of the wrong value, or something else that "minor".
If it doesn't pass the test I suggested, returning it is probably a good option.
One last thing I would do, is test it on another port of another NXT with good batteries, and use a different wire. That would rule out almost everything else all at once.
I've done all this:
different wires, same wires with different sensors, different wires with different sensors, same sensor with different SensorTypes, different sensors with different SensorTypes. All the same.
maximum measured pressure = about 40 kPa=0.4bar instead of 300 (or at least 200 or at max. 500) kPa
How about a different NXT? Your NXT could be the problem. If your 5v regulation circuit is not working properly, that could very well be the issue. I have never heard of a failure like this, but I guess it could happen.
You still never eliminated the one common thing: the firmware.
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)