Society of Robots - Robot Forum

Software => Software => Topic started by: Android19 on July 30, 2006, 10:51:07 PM

Title: Programming Oopic 2
Post by: Android19 on July 30, 2006, 10:51:07 PM
Hi there, well since the last time I posted a did alot of design and prototyping of my first robot. I thought I had prepared enough and ordered the parts. I downloaded the free latest version of OOpic 2 compiling software. I know what I want the robot to do but have no idea how to make it into code. I want it to drive forward then use a servo with the IR rangefinder attached and scan 180 degrees taking readings of obstacles. Then I want it to take the path with no obstacles in its way. Can anyone help?
Title: Re: Programming Oopic 2
Post by: Admin on July 31, 2006, 09:40:36 AM
read this yet?
http://www.societyofrobots.com/sensors_sharpirrange.shtml
Title: Re: Programming Oopic 2
Post by: Android19 on July 31, 2006, 11:08:09 AM
Yes, I have.
Title: Re: Programming Oopic 2
Post by: Admin on July 31, 2006, 11:15:38 AM
Ok . . .

The sharp IR is an analog sensor, meaning the code to use a photoresistor is exactly the same. You plug the sharp IR into an ADC port, and read in the value just the same.

Sample code for interfacing OOPic to an IR Rangefinder:
http://www.acroname.com/robotics/info/examples/GP2D02-5/GP2D02-5.html

And to understand how the servo works:
http://www.societyofrobots.com/actuators_servos.shtml

And for sample code using servos on an OOPic:
http://www.acroname.com/robotics/info/examples/servo-1/servo-1.html
Title: Re: Programming Oopic 2
Post by: Android19 on July 31, 2006, 12:28:54 PM
Thats what I was looking for thanks!!!