Now that we're on break, I had some time to do another demo in the series; this video shows a robot using the Android phone's camera to locate the line and follow it. The connection is based on Bluetooth, and all that is sent is the line's distance from "the center" of the received image. Around near 0:57, you can see the yellow dash that marks the position of the line. This is subtracted from the center of the screen (width/2) and sent to the NXT, which adjusts the motor speeds proportionally using the steering function. The bright light that creates a glare in the screen is actually the flash on the camera, which I turned on in order to eliminate outside lighting conditions. The phone is almost as good, if not better, as a light sensor!
Enjoy, and happy building!
Richard
7 comments:
Hey there, nice work! Do you have plans to release the source code so others can learn from it?
Regards,
Xander
Hey Richard,
Looks good! I'm also interested to hear how you did it :)
Laurens
Hi Xander and Laurens, yes! You can find code here: http://lichard.xtreemhost.com/camera_line_follower.html
The rest of the site is still kind of rough, but you can at least see the code. Enjoy!
Richard
Very Interesting!
http://www.dexterindustries.com
i just tried the code with samsung galaxy note. but it didnt work..is the code complete. if note plz send me the code
monishanova@gmail.com
i have some run time error
but,your code seems enough to run
i miss something?
Post a Comment