Shop OBEX P1 Docs P2 Docs Learn Events
LEGO Light sensor — Parallax Forums

LEGO Light sensor

O.T.RobotO.T.Robot Posts: 17
edited 2008-07-05 10:21 in Robotics
GOOD DAY

· I was Woundering if I can use LEGOs light sensor with my BS2
··and what shuld the code look like

· Thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-04 20:19
    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.
  • O.T.RobotO.T.Robot Posts: 17
    edited 2008-07-05 10:21
    Thanks Mike for your help and time

    Have a GR8 day
Sign In or Register to comment.