Shop OBEX P1 Docs P2 Docs Learn Events
need help on controling a servo motor — Parallax Forums

need help on controling a servo motor

apacheapache Posts: 7
edited 2007-03-04 15:49 in BASIC Stamp
hi there to all. i need help on controlling a servo motor.·i need a program which can read data from a ultrasonic sensor and control a servo motor. if anyone can help me about this program please contact me.· the control will be like this if ultrasonic sensor sees the obstacle in x distance it will turn a little bit and if it sees the obstacle in y it will turn to the other side a little bit. The x and y are two variables which vary like 40>x>20>y>0. if you can help on this please write here thanks.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-28 21:09
    You need to download some tutorials from the Parallax Stamps in Class web page like the What's a Microcontroller? and the Robotics manual (www.parallax.com/html_pages/edu/curriculum/sic_curriculum.asp). These will show you how to control a servo and do lots of other things. Download the manual for the PING ultrasonic sensor and some of the sample programs. There are programs already available that show a BOE-BOT with a PING sensor navigating around a room and you can use these as a starting point. Look at Roaming with a PING (www.parallax.com/detail.asp?product_id=570-28015).

    Post Edited (Mike Green) : 2/28/2007 9:14:10 PM GMT
  • apacheapache Posts: 7
    edited 2007-02-28 21:39
    actually i ned the exact program thats why i explained the situation very briefly if anyone can help us directly i will be very happy
  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-04 15:37
    These forums are for help with projects, with understanding concepts and with troubleshooting. Generally, people don't provide "exact program"s unless they already exist as examples like "Roaming with PING". Occasionally, someone who consults for a living will take on a project privately for their usual fees (very expensive!) and I don't think that's what you want. You will have to do the work. There are plenty of references to give you examples and discussions of how to change them to suit your purpose. I've listed the most important and probably most useful and I'd be happy to help you understand things that you get stuck on, but, again, you'll have to do the work.

    Do have a look at "Roaming with PING". It's a complete, functional example of using an ultrasonic sensor (the PING) to control a servo motor (actually two of them) to move a little robot. It sounds very similar to what you want to do.

    Post Edited (Mike Green) : 3/4/2007 3:42:38 PM GMT
  • El PaisaEl Paisa Posts: 375
    edited 2007-03-04 15:49
    ·nono.gif··· It is my guess, if you need an exact program, hire a programmer to do it for you.
Sign In or Register to comment.