Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: cyclopediatechtilon on February 10, 2009, 09:42:50 AM

Title: PHOTORESISTORS of 50$ robot
Post by: cyclopediatechtilon on February 10, 2009, 09:42:50 AM
I am building the 50$ robot and i finished everything exept photosensors
can anyone please tell me what the code admin gave on sensors means??
I mean to say what exactly happens between the servo and photoresistor?
Title: Re: PHOTORESISTORS of 50$ robot
Post by: pomprocker on February 10, 2009, 11:02:02 AM
Its a photovore so if one side senses light, it will go that way.
Title: Re: PHOTORESISTORS of 50$ robot
Post by: frodo on February 10, 2009, 11:52:37 AM
you could also modify it so that it is a photophobe which means that if one side senses light, it will go in the opoosite direction.
Title: Re: PHOTORESISTORS of 50$ robot
Post by: MaltiK on February 10, 2009, 02:20:20 PM
see where he typed "pseudocode"
Title: Re: PHOTORESISTORS of 50$ robot
Post by: frodo on February 10, 2009, 04:30:24 PM
where exactly does it (whats it?) say pseudocode, MalitK?
Title: Re: PHOTORESISTORS of 50$ robot
Post by: Jdog on February 10, 2009, 05:26:35 PM
The photoresistor is sending an analogue value back to the microcontroller. The analog value is proportional to the amount of light that is hitting the photoresistor. The microcontroller then interprets this value and compares the values of the left and right sides. So if the left sensor has a greater value than the right, there is more light on the left side, and therefore you tell the robot to turn left, and vice versa. If they are equal, it goes straight.