go away spammer

Author Topic: Servo + Sharp  (Read 2645 times)

0 Members and 1 Guest are viewing this topic.

Offline lucasromeiroTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Servo + Sharp
« on: March 22, 2012, 07:05:50 AM »
 Hello, I'm from Brazil, like the radar that made using servo motor and sensor sharp, I'm trying to do the same here using Arduino, you guys have some code to arduino you can help me? I have trouble, any help is good!
I appreciate the help.

Offline lucasromeiroTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: Servo + Sharp
« Reply #1 on: March 22, 2012, 07:24:38 AM »
please, help me. I need, never used arduino. Servo motor is also complicated for me, but I appreciate any help. I would do this:
http://www.societyofrobots.com/robot_sumo.shtml
using a radar sensor analog distance SHARP and a servo motor to drive the sensor and set where you have something and lock the target on the object.

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: Servo + Sharp
« Reply #2 on: March 22, 2012, 07:48:02 AM »
It's hard to respond with no details. I have no idea what "radar sensor analog distance SHARP " is. I understand that English may not be your native language, but maybe you could give a model number or something so we know what you're talking about. Sharp rangefinders are infrared based, not ultrasonic, so I can't even guess which one you're using.

Do you have the data sheet for whatever sensor you're using? It probably gives information on interfacing in it. If not, just give us more specifics so we can help.

Also, searching the web will turn up quite a bit, for example https://duckduckgo.com/?q=rangefinder+arduino

Joe

Offline lucasromeiroTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: Servo + Sharp
« Reply #3 on: March 22, 2012, 08:25:05 AM »
Hello Joe, thanks for the reply!
I am using this sensor: http://www.pololu.com/catalog/product/136
is the same as was used in the link I posted.
I do not want to measure the distance, I use it basically as a digital sensor, the distance does not matter. My need is to make a radar to see where my opponent is, see this demo I made using a PIC and stepper motor:

27-05-10_0013.3gp

however now I need to use a servo motor and arduino are two things that never used and I have difficulty. help me?
really need help;

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: Servo + Sharp
« Reply #4 on: March 22, 2012, 08:47:54 AM »
The Sharp sensor gives an analog output, so you'll have to read it using an analog to digital converter. To do this with Arduino use the analogRead() function. To control the servo use the Servo library (see the arduino site for examples in the libraries section). If you're going to use it as a binary sensor, you'll have to pick some threshold value and use that as the on/off point. You could also set up an analog comparator, but just picking a swing point is easier.

You would probably be best off spending some time at the arduino site and look through the tutorials on the language an libraries:

http://arduino.cc/en/Tutorial/HomePage
http://arduino.cc/en/Reference/HomePage

Joe

Offline lucasromeiroTopic starter

  • Jr. Member
  • **
  • Posts: 8
  • Helpful? 0
Re: Servo + Sharp
« Reply #5 on: March 22, 2012, 09:10:26 AM »
Thanks Joe, helped a lot, did not know that arduino already had everything ready, good to know, Why do it by hand gave me a lot of work, you're right, I will read the adc and make a range of detection. I hope for sure! The chem is an Arduino I bought in China and will take one month to arrive. = /

 


Get Your Ad Here