Go Down

Topic: Motorshield vs. Servo Problem (Read 1 time) previous topic - next topic

Bridgeguard

Hi Folks
I hope this is the right Category.
Got a Problem with the Connection between Servo, Motor-Shield (powered with 9V 1200mA) and my Duemi.
I conntected a Robbe Digital Servo to the Motor Shield onto the Pins for Servos.
(Data sheet -> Pin 10)

Next I uploaded:
#include <SoftwareServo.h>

SoftwareServo servo1;


void setup()
{
  pinMode(10,OUTPUT);
  servo1.attach(10);
  servo1.setMaximumPulse(2200);
   Serial.begin(9600);
  Serial.print("Ready");
}

void loop()
{

servo1.write(90); // Got To 90 degrees
delay(2000);      // Wait a lil bit
Serial.print("90"); //Monitoring
servo1.refresh();

servo1.write(0);
delay(2000);
Serial.print("0");
servo1.refresh();

}

But the Servo is not working.
I tried different Codes with and without refresh, different times and Pins but it wont work.
The Servo is Ok (Tried with RC).
Maybe I misunderstood something?!
Can someone help?!

PaulS

Why are you using (or trying to use) SoftwareServo, instead of Servo?

Why are you using a motor shield to control a servo?

The art of getting good answers lies in asking good questions.

Bridgeguard

Hi
I get the Shield and Servos as Christmas presents ;)
When I was searchin for servo.h, i was linked to softwareservo... thats why I used.
And now the problem is still not solved.  :~

PaulS

You modified the code, and didn't post the modified code. But, you still want us to tell you what is wrong with it?

Our psychic is off until the middle of March. If you need help before then, you'll need to post your code.
The art of getting good answers lies in asking good questions.

Go Up