hi vendorf70, when applies a voltage (5 V) to the LED and charges up the capacitor that exists at the junction between the two types of silicon sandwiched together in the LED. Then, the RCTIME command changes the I/O pin to input (doesn’t send a high or low signal, just listens), and measures the time it takes the junction charge to decay below 1.4 V. This time is controlled by how much light shines on the LED. The program measures the number of 2 μs time increments it took for the LED voltage to reach 1.4 V and stores it in a variable named time.
’ Test LED Light Detector.bs2 ’ {$STAMP BS2} ’ {$PBASIC 2.5} time VAR Word DO HIGH 11 PAUSE 1 RCTIME 11, 1, time DEBUG HOME, DEC5 ? time PAUSE 200 LOOP
moreover Led are cheaper of photoresistor
Now i’m looking to do same with Arduino
Anyway basic stamp project as still some problem: Horizontal movement is not stable in continue to move back and forth
as you can see on video
I must use a feedback
If anyone have made same project please let me know