Try it with the phototransistor connected to an arduino input pin. Take the LED out of the circuit and connect it up like this: 5V ---- /\/\/\/ -- wire to Arduino input pin---- phototransister --- GndRun one of the switch test sketch's, the wire to the phototransistor will act like a switch and make the digitalRead go low and high as IR light level reaches the correct level for the phototransistor.
It's very sensitive to ambient light. I need to tweak my resistors some I guess.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16