Photoresistor help
Shy
Posts: 15
Hi,
I have boe-bot robot. on it ping and infrared head lights are also working. now i want when my robot go into low intensity light area it shutdown, means stop working.
·
I have boe-bot robot. on it ping and infrared head lights are also working. now i want when my robot go into low intensity light area it shutdown, means stop working.
·
Comments
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Parallax Tech Support·
, thephotoresistors remain in shadow. but when light falls on·robot it should wake up·
DO
SLEEP 60
GOSUB seethelight
LOOP UNTIL light > threshold
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
DO
SLEEP 60
GOSUB seethelight
LOOP UNTIL light > threshold
is it the complete code, i am little confused about subroutine·{·GOSUB seethelight} , please explaine
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
You can connect the photoresistor in series with a fixed resistor from Vdd to Vss, and the junction to a Stamp pin, so that PBASIC will read 1 on that pin in the dark and 0 in the light. You have to discover the correct value of fixed resistor or provide more information about your photoresistor.
Then at the end of the main loop, add the lines marked with "<
":
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com