go_away

Author Topic: Programming Oopic 2  (Read 4795 times)

0 Members and 1 Guest are viewing this topic.

Offline Android19Topic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Programming Oopic 2
« 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?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: Programming Oopic 2
« Reply #1 on: July 31, 2006, 09:40:36 AM »

Offline Android19Topic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: Programming Oopic 2
« Reply #2 on: July 31, 2006, 11:08:09 AM »
Yes, I have.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: Programming Oopic 2
« Reply #3 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

Offline Android19Topic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: Programming Oopic 2
« Reply #4 on: July 31, 2006, 12:28:54 PM »
Thats what I was looking for thanks!!!

 


Get Your Ad Here