Unexpected Behavior with code

mthurman:
The servo is rated for 6 volts. If I power it with 4AA batteries should I hook up this way?

Servo

  • Pwr - to 4AAs
  • Grnd - to Arduino w/ neg from 4AAs
  • Signal - to Arduino pin

Thanks!

Matt

yes, a little more clearly:

Battery +6vdc (4 AA in series) to servo(s) power lead, usually red
Servo signal to Arduino output pin
Servo ground (usually black) to negative of battery pack
Negative battery pack to arduino ground pin

Lefty