Thanks for the replies, and sorry it took a week to get back on. I had work and a bunch of stuff come up. Grounds are properly connected. In any case what exams are you referring to?
Code being used:
#include <Servo.h> // servo library
Servo servo1; // servo control object
void setup()
{
servo1.attach(9);
}
void loop()
{
int position;
servo1.write(90); // Tell servo to go to 90 degrees
delay(1000); // Pause to get it time to move
servo1.write(180); // Tell servo to go to 180 degrees
delay(1000); // Pause to get it time to move
servo1.write(0); // Tell servo to go to 0 degrees
delay(1000); // Pause to get it time to move
for(position = 0; position < 180; position += 2)
{
servo1.write(position); // Move to next position
delay(20); // Short pause to allow it to move
}
for(position = 180; position >= 0; position -= 1)
{
servo1.write(position); // Move to next position
delay(20); // Short pause to allow it to move
}
}
I deleted out as many comments as I could in the short time I have. I think I only deleted comments.
The code looks good to me. Compiles fine. The only thing I find atypical is position += 2, etc. Typically I would use position++ but I program primarily in Java and I believe Arduino is a variant of C?
Furthermore is there a tutorial that I overlooked on how to add an external source of power to a component? I think I know what I'm doing but if I'm not doing something right it could just as easily be that.
See attachment for circuit diagram I'm provided. In case of blurriness: 5V from Arduino to breadboard power, GND to breadboard ground. From the same side of the H-bridge as power/ground: Power to A6, Ground to B5, ~9 on Arduino to A6, E5, 6, 7 to Servo brown, pink, orange (or black gnd, red power, white control[?]) respectively.