Here's an article on how the LEGO sensors work (www.barello.net/ARC/projects/LEGO/). It would be possible using an external analog to digital converter like the ADC0801, but I've not seen any sample code for the LEGO sensors. There is plenty of sample code for the use of any of several analog to digital converters with a Stamp. Look in the Nuts and Volts Columns and in the Basic Analog and Digital tutorial. In both cases, go to Parallax's main webpage, choose the Resources tab. You'll see a selection for Nuts and Volts Columns. You'll also see a selection for Downloads. If you choose that, you'll see a Stamps in Class Downloads selection. You'll file the tutorials there.
There are some techniques for measuring analog voltages directly with a Stamp using the RCTIME statement, but this may be too slow for the LEGO sensors. There's a discussion of this here (www.emesystems.com). Try under Stamp / app-notes. This site also has a lot of other information on sensors and analog to digital conversion.
Comments
There are some techniques for measuring analog voltages directly with a Stamp using the RCTIME statement, but this may be too slow for the LEGO sensors. There's a discussion of this here (www.emesystems.com). Try under Stamp / app-notes. This site also has a lot of other information on sensors and analog to digital conversion.
Have a GR8 day