Step 6Making Ard-e see, or at least go towards the brightest light
So these photocells change their resistance from around 10K to 100K ohms. I made up a little excel spreadsheet to figure out the possible values it would output if i hooked it up as a voltage divider. I got around 30K as providing the greatest difference from high resistance to low. I found some 39K resistors and figured they would work fine.
I just stuck them into the breadboard bent them forward and started testing out programs to make it seek out the brightest light. I ended up writing a program that reads the value from both sensors and if they are different by 8 it turns towards the one that is reading a higher value of light hitting it. I also used the 9V battery between the two sensors to block some of the light from spilling over and affecting the readings of the second photocell when Ard-e was turned one way.
Here is a video of Ard-e following the light from a flashlight that I was shining at him then veering off and going towards the light coming from the door. The quality of the video is really bad because the readings of the sensors get all screwy if alot of background light is present.
Now on to making Ard-e smell and hear.
| « Previous Step | Download PDFView All Steps | Next Step » |
1
comment
|
Add Comment
|
Chowmix12
says:
imadami (author)
says:
Chowmix12
says:
Chowmix12
says:
![]() |
Add Comment
|
















































