Shop OBEX P1 Docs P2 Docs Learn Events
New to boe bots and loving it, but having a turning problem. — Parallax Forums

New to boe bots and loving it, but having a turning problem.

menosdabearmenosdabear Posts: 1
edited 2009-04-04 00:15 in Robotics
Hey guys, I just started fooling around with a boebot and I am having an awesome time with it, it is so much fun. I have so far outfitted my robot with a grabbing arm and ultrasonic sensors. Right now I have him moving forward, seeing an object, open the grabber, get it in position and then close the grabber and turn around. My problem is I cannot seem to figure out how to get it to stop after it turns 180 degrees and then come back to me. Is there possibly a timer type command i could use to maybe tell it to turn for a specific amount of time and then move forward again? or possibly a way to tell it how many degrees or radians i want the shaft driving the wheels to turn? I appreciate any help, thanks guys.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-04-04 00:15
    There isn't anything that really works the way you're thinking. The BoeBot doesn't have a secret built-in timer or any built-in way to sense how the wheels have turned, etc. You can add things to do that or you could approximate it.

    1) There's a wheel encoder kit that's available that you can install that uses the holes in the wheels as a measurement tool along with photosensors to tell how many wheel slots have passed by. That can be used to estimate the distance travelled by the wheels including while turning in a circle.

    2) Most servo control uses pulses issued about 50 times a second and the PAUSE statement used for this is pretty accurate. There is other stuff being done in the movement code that has a somewhat variable time involved, so the PAUSE times are not very accurate, but they can be used for special circumstances like a turn when nothing else might be going on.

    3) You could add a compass like the HM-55B. It's not the most accurate compass, but could be used to determine when the BoeBot has turned approximately 180 degrees. You might have to make several readings and correct the BoeBot's direction as it moves, but it would give you an "absolute" direction reference.
Sign In or Register to comment.