Can I use the Arduino's digital pins for 5V and ground? Answered
I am making something using a servo and an Arduino, and it would make my design a lot simpler if I could use the Arduino's digital pins instead of its ground and 5v pins for power. However, I haven't been having much luck. When I use the ground and 5v pins for power, the servo works like it should. However, when I code the Arduino's digital pins 3 and 2 to output high and low, and then attach those pins to the servo's positive and negative wires, it just makes a ticking noise. I have done some basic troubleshooting, such as trying multiple pins and going over everything with a multimeter, but it hasn't revealed any problems.
Does anyone know how to resolve this?
In case you are wondering about my code, it's basically the Arduino Sweep code with two outputs added.
int pos = 0;
int servoPos = 3;
int servoNeg = 2;
for(pos = 0; pos < 180; pos += 1)
for(pos = 180; pos>=1; pos-=1)