Using a MG995 Servo with a sparkcore

I am new to hardware and among the things I got to get started I purchased a servo:

I haven’t been able to incite a response from the servo using any of the write methods in the servo lib, and I know the servo isn’t dead (and that it is powered) as I can get a response by taking the sensor wire and tapping it against it’s own input wire, it only jumps at the beginning of the tap – holding it against the live wire does not incite a sustained response.

I also know my code is running since I can make the main LED blink arbitrarily in the loop.

I know this question is a little vague, are there any obvious things I might be doing wrong?

EDIT: if it helps at all, I am powering the servo with 2 AA batteries on a separate breadboard

I had it wired like this:

battery (+) -> servo power
battery (-) -> servo ground
servo signal -> sparkcore (D0)


At a minimum, you’ll need to connect the ground of the Spark Core to the ground of the servo, in addition to the battery pack.

Do you know if the servo will work off of 3 V? Seems a bit low, but I’ve not read the specs of that unit. The one that I was playing with needed 5V to operate properly.

But, fix the ground issue first. Then worry about the battery voltage.





Excellent call on both counts.

I got it to work by hooking up 4 AA batteries, and then by putting the ground of the servo to both the battery and the SC.