Author Topic: help operating a servo.  (Read 2453 times)

0 Members and 1 Guest are viewing this topic.

Offline 123laurensTopic starter

  • Full Member
  • ***
  • Posts: 59
  • Helpful? 0
help operating a servo.
« on: August 17, 2011, 09:22:33 AM »
help, i cannot operate this servo-small from sparkfun( http://www.sparkfun.com/products/9065 ).i have sent an email and posted in their comments, but no replys every time i send a pulse to it, it simply jolts in one direction. no matter what that pulse is! using ardurino and a variety of pulses. even:
Code: [Select]
digitalWrite(cammotpin,HIGH);
delayMicroseconds(90000);
digitalWrite(cammotpin,LOW);

does the same thing, or

Code: [Select]
digitalWrite(cammotpin,HIGH);
 delayMicroseconds(0020);
 digitalWrite(cammotpin,LOW);
i have this in a loop and it only jolts 1ce, then not even resetting makes it work again, only re-uploading the code or removing and re-applying power. HELP!
and i can operate the full rotation servos, but this one is for the IR rangefinder.

Offline 123laurensTopic starter

  • Full Member
  • ***
  • Posts: 59
  • Helpful? 0
Re: help operating a servo.
« Reply #1 on: August 17, 2011, 10:55:47 AM »
come on people, ive w8ted for weeks now on sparkfun!

Offline garrettg84

  • Robot Overlord
  • ****
  • Posts: 187
  • Helpful? 8
  • Armchair Roboticist Extraordinaire
    • http://www.garrettgalloway.com/
Re: help operating a servo.
« Reply #2 on: August 17, 2011, 11:10:27 AM »
try google

http://arduino.cc/en/Tutorial/Sweep

#include <Servo.h>

Servo myservo;

void setup()
{
  myservo.attach(9); // set servo control on pin 9
  myservo.write(90);  // set servo to mid-point
}

void loop()
{

}
-garrett

Offline 123laurensTopic starter

  • Full Member
  • ***
  • Posts: 59
  • Helpful? 0
Re: help operating a servo.
« Reply #3 on: August 17, 2011, 11:49:36 AM »
fixed it!
some wiring-related problem, signal and 5V were confused, explaining why it julted.
silly mistake, sorry!

 


Get Your Ad Here

data_list