hello!
This is my second post here, as I have magically resolved my first problem by myself.
I have a full rotation servo GWS S03NSTD, I figured out the 'write' values that give me the results I need:
93 is center
0 s CW
180 is CCW
97 is CCW slow
89 is CW slow.
Here is what I need.
Upon start of a program the servo is rotating CW at full speed.
myservo.write(0);
What I need to happen is upon a switch press, the servo moves in the opposite direction (CCW).
For some reason however, the servo takes too long to respond, what I mean is say the switch is connected to pin 4 (yes, everything is properly declared), and then I plug the 3V3 jumper into pin 4 (that's my switch), the SMD LED "L" flashes for a sec (while the servo is still spinning CW) then sometimes it (the servo) jolts a few times and only then does the servo start to spin in the opposite direction.
The delay is 5 seconds or more.
The pin may be floating---do you have pullup resistors?
Why are you using 3v3?
You may be experiencing contact bounce. The contacts in the switch may bounce some before settling. Shouldn't be 5 seconds though.
Can the arduino handle the current needed to drive the servo? It may be resetting when changing direction, it probably draws more current then. Especially if there is contact bounce and it is switching direction a lot in a short amount of time. (i think)
Sorry for doublepost, but thank you very much!
The floating pin was fixed via using a pullup resistor and this took the float away!
Not sure if it was an issue, but the pullup resistor did the job!
Glad I could help.
And by the way, the atmega chip has built-in pullups on each pin. Just initialize a pin as an input, then digitalWrite it HIGH, and the internal pullups are enabled.