Hello everyone..im new on arduino forums...i just brought my Ardiuno along with the servo tower pro MG995 for a private project. the servos are not behaving as i wanted. i have to other SG90 micro servos which is working with the same code . but the MG995 is behaving weirdly.
i tried powering the servo from arduino as well as from external 9v power source. both didnt work well. Please Help.
the code was the example code for servo sweep in the servo library.
And i wish to post a video but it exceed over 1MB so do please tell me a way to do that too .
Powering servo from Arduino 5V pin is no good, not enough current, 9V is too high, will burn it out, do you have a 6V supply or 4 AA batts in series? have you seen this review?
Try this test pgm with servo on pin9:
/*
Try this test sketch with the Servo library to see how your
servo responds to different settings, type a position
(0 to 180) or if you type a number greater than 200 it will be
interpreted as microseconds(544 to 2400), in the top of serial
monitor and hit [ENTER], start at 90 (or 1472) and work your
way toward zero (544) 5 degrees (or 50 micros) at a time, then
toward 180 (2400).
*/
#include <Servo.h>
Servo servo;
void setup() {
// initialize serial:
Serial.begin(9600); //set serial monitor baud rate to match
servo.write(90);
servo.attach(9);
prntIt();
}
void loop() {
// if there's any serial available, read it:
while (Serial.available() > 0) {
// look for the next valid integer in the incoming serial stream:
int pos = Serial.parseInt();
pos = constrain(pos, 0, 2400);
servo.write(pos);
prntIt();
}
}
void prntIt()
{
Serial.print(" degrees = ");
Serial.print(servo.read());
Serial.print("\t");
Serial.print("microseconds = ");
Serial.println(servo.readMicroseconds());
}