Code works on Arduino but not Spark Core?

Hi everyone,
I have some code that controls an RGB LED light strip… But the code doesn’t run on the Spark Core (with only change to the pin numbers).

The code doesn’t come out well in the forum so heres a link to pastebin:

Please help.

Doesn’t look that complicated. I’ll test when I have time later :slight_smile:

@jbonnett, the code compiled fine for me. Can you paste the error message when you attempt to compile?

There is no error, it compiles for me but does not work… I have an RGB LED strip that I am controlling from this code, and the Arduino works fine. It’s just the Spark Core (It doesn’t want to control the LED strip) e.g. analogWrite().

Your code did not performed pinMode(pin, OUTPUT) and I’m surprised it worked on Arduino…


I can’t believe I missed that! Haha cheers man :slight_smile: