Show Posts
Pages: [1]
1  Using Arduino / Motors, Mechanics, and Power / Re: (Noob) Servo question, TowerPro SG-5010 won't move. on: May 31, 2011, 01:05:43 pm
Just tried it with a another 5010, and it works. Probably a faulty servo? Or can the difference in current between servos be that big?
2  Using Arduino / Motors, Mechanics, and Power / (Noob) Servo question, TowerPro SG-5010 won't move. on: May 31, 2011, 11:28:43 am
Hi!

I'm new to all this and I have a question about my TowerPro SG-5010 servo.

With this code I'm able to move a micro servo by rotating a pot.
But when i swap the micro servo for my TowerPro (a lot bigger) it won't work.

Is this a power related problem? What do i need to do to make use of my 5010?

Thank you very much!

#include <Servo.h>
Servo myservo;
int sensorPin = 0;
int sensorValue  = 0;

void setup() {

  myservo.attach(9);

}

void loop(){

  sensorValue = analogRead(sensorPin);
 
  int place = map(sensorValue, 0, 1023, 180, 0);
 
  myservo.write(place);

}
Pages: [1]