Moving Head - not moving


#1

Hello,

Just picked up a Sparki and have had success with the example programs and some original stuff, all except for one: Moving the distance sensor head.

I download the lesson code and uploaded the following - but nothing happens. Any ideas? Straight copy-paste of the code used follows below.

Thanks very much!

  • Frank

********************** CODE BELOW ************************

#include <Sparki.h> // include the sparki library

void setup()
{
}

void loop()
{
sparki.servo(SERVO_LEFT); // rotate the servo to is -90 degree postion (left)
delay(1000);

sparki.servo(SERVO_CENTER); // rotate the servo to is 0 degree postion (forward)
delay(1000);

sparki.servo(SERVO_RIGHT); // rotate the servo to is 90 degree postion (right)
delay(1000);

sparki.servo(-90); // rotate the servo to is -90 degree postion (left)
delay(1000);

sparki.servo(0); // rotate the servo to is 0 degree postion (forward)
delay(1000);

sparki.servo(90); // rotate the servo to is 90 degree postion (right)
delay(1000);
}


#2

Hi Frank,

Are other motors moving? Just want to make sure the batteries are in, and the power switch is on. This is the problem 90% of the time with this.


#3

Yes, everything else works on the Sparki - wheel motors too.

So problem has been solved! I noticed the motor plug for the Moving Head was slightly sticking out, so I nudged it in further, reset the Sparki and then it worked. Probably wasn’t plugged in firmly during assembly and/or somehow got dislodged slightly in transit.

Something to keep in mind should someone else post a similar issue.

Thanks very much for the quick response though! Very much appreciated.

  • Frank