Well, I saw another post about this, with no real solutions.
My servo, jitters and shakes the robot (steering servo).
Sometimes the throttle control does the same thing. Well, it causes the robot to jump forward and back...
I think it is because of these thin wires, and bad connections on the data wires.
I have no idea. I am contemplating a screw terminal module, like this one
const int Strait = 90;//
const int Left = 65;//
const int Right = 115;//
Next is in setup();
//ATTACH AND ALIGN STEERING
steeringPin.attach(7);
steeringPin.write(90);
delay(1000);
then I call for a change later
steeringPin.write(Left);
very simple, and yet, it shakes and jitters.
How do I fix this? I have tried several different delays after the steeringPin.write(Left);
With or without the delay, it shakes and fails to work correctly.
The power to the servo is 5V, from a separate power supply than the Arduino.
Simple servo test code you can try to see if the servo jitters with this code.
//zoomkat 7-30-10 serial servo test
//type servo position 0 to 180 in serial monitor
// Powering a servo from the arduino usually *DOES NOT WORK*.
String readString;
#include <Servo.h>
Servo myservo; // create servo object to control a servo
void setup() {
Serial.begin(9600);
myservo.attach(9);
Serial.println("servo-test"); // so I can keep track of what is loaded
}
void loop() {
while (Serial.available()) {
char c = Serial.read(); //gets one byte from serial buffer
readString += c; //makes the String readString
delay(2); //slow looping to allow buffer to fill with next character
}
if (readString.length() >0) {
Serial.println(readString); //so you can see the captured String
int n = readString.toInt(); //convert readString into a number
Serial.println(n); //so you can see the integer
myservo.write(n);
readString="";
}
}
Which means he hasn't got one yet. His post is poorly worded and it is not clear what products this screw terminal module or indeed screw terminal shield actually is. A link would clear it up.
I had one of my motors connected to a 3.3V power supply, and it jittered extremely bad. I asked a hobbyist and he said it wasn't getting enough power. I connected mine to a 6V power supply and no jitters!
So, to help, regardless of what others think, separate your power.
That is not a help regardless of what you might think. It is a propagation of miss information.
because sometimes people don't pay attention and ground more than one power supply together
ALL power supplies must have their grounds connected together did you not read the link.
Using the proper words is important. Doctor I have cut off my leg, sorry I should have said hair.
This forum is where you get good solid advice not poor badly thought out superstition like you are giving. If you are seeing an effect when doing an experiment that runs counter to logic then there is something wrong with the experiment. You can not reinvent the laws of physics just because you don't understand them.