Hiho everyone,
I´m new in the community and new to the programming of Digisparks in general.
I´m trying to troubleshoot my issue since a few days already and didn´t find any solution. So I´m asking now the pros over here.

Here my issue:
I´m trying to reach a sweep movement from a SG90 servo and to control the sweeping speed with a potentiometer.
Everything works fine, but the servo wont turn 180° (it turns 90° or something around that)

By trying the same on an Arduino UNO, everything is fine....
Below the code:
#include <SoftRcPulseOut.h>
SoftRcPulseOut myservo; // create servo object to control a servo
int pos = 0; // variable to store the servo position
int val; // variable to read the value from the analog pin
void setup()
{
pinMode(1, OUTPUT); // To Servo
pinMode(2, INPUT); // Poti Input
myservo.attach(1); // attaches the servo on pin 1 to the servo object
myservo.setMaximumPulse(9600);
}
void loop()
{
for(pos = 0; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
val = map(analogRead(1), 0, 1023, 0, 10);
Serial.println(val);
delay(val); // waits for the servo to reach the position
myservo.refresh(20);
}
for(pos = 180; pos > 1; pos -= 1) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position in variable 'pos'
val = map(analogRead(1), 0, 1023, 0, 10);
Serial.println(val);
delay(val); // waits for the servo to reach the position
myservo.refresh(20);
}
} Any idea on how to solve this issue?
Thanks in advice,
Anto