Compilation errors

I just got my Sparki and I’m trying to find my way around.

I can’t compile anything that needs Sparki.cpp
I get the following error message:

core.a(Sparki.cpp.o): In function `SparkiClass::RGB(unsigned char, unsigned char, unsigned char)': C:\Program Files (x86)\SparkiDuino\hardware\arduino\cores\arduino/Sparki.cpp:299: multiple definition of `SparkiClass::RGB(unsigned char, unsigned char, unsigned char)' sparki\Sparki.cpp.o:C:\Users\Cleo\Documents\Arduino\libraries\sparki/Sparki.cpp:239: first defined here
and many more just like it

I had an Arduino installation already, but I uninstalled it, and uninstall/reinstall SparkiDuino to no avail.

My first attempt was running the RGB example. No go
However if I open the one that I can find under Sketchbook/Libraries/Sparki , that one compiles.
I notice it uses the ‘robot’ object instead of the ‘sparki’ object
robot.RGB instead of sparki.RGB

What’s the scoop on that?

Duh…
The following line is missing in the example

SparkiClass sparki;

With no object to work on, it can’t compile of course…

Still not done.

The following code will not compile as is. It gives me the same error message that I had at first (complaining about RGB having multiple definitions)
But it will compile if I remove the call to clearLCD();

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

SparkiClass sparki;

void setup()
{
   sparki.clearLCD();  // will compile if I remove this line
   sparki.begin(); // start the robot up
}

void loop()
{
  sparki.RGB(255,0,0); // Make the LED maximum Red
  delay(500); // wait 0.5 seconds (500 milliseconds)

  sparki.RGB(0,255,0); // Make the LED maximum Green
  delay(500);
}

Hi CleoQc,

Its actually none of these. It looks like you installed SparkiDuino, then installed the library separately on top of that (no need, it already comes pre-installed with SparkiDuino). Now there are two instances of the Library, and its getting confused about which one to use. If you remove the Sparki folder in “C:\Users\Cleo\Documents\Arduino\libraries” all these problems should go away.

I had installed Arduino a little while back, and I may have installed Sparki libraries around Christmas.
When I got Sparki, I installed SparkiDuino.

Since nothing was compiling, I uninstalled Arduino, but that didn’t help. I had to uninstall SparkiDuino too, and manually delete all sketchbook folders on my computer, and reinstall SparkiDuino.

This led to a funny warning message btw:

That fixed my problems.