I got this string of 114 APA-102 LED's all connected to an Arduino Uno

I got this string of 114 APA-102 LED’s all connected to an Arduino Uno R3. When compiling the FastLED library I get a load of errors. Strip is turning on, but the first led is lit blue, while the rest is bright red. I am completely new to Arduino, so I can’t make anything of it. Does anyone know what’s up?

That is:

*FastLED 3.0.3
*Arduino Uno R3, no addons
*Windows 8.1
*http://pastebin.com/82eSfJGL

I see a pastebin of your errors, but not the code itself, however I suspect that you haven’t installed the library correctly.

Well, that paste was just as requested by the page. And I did rename the FastLED download to remove the suffix prior to adding it to the library. Even tried manually copy/pasting the entire file in the library directory but that just gave me the same issue.

If you supplied your code, we could see if it compiles elsewhere.

#include <block_clockless.h>
#include <chipsets.h>
#include <clockless.h>
#include <clockless2.h>
#include <clockless_arm_k20.h>
#include <clockless_arm_sam.h>
#include <clockless_trinket.h>
#include <color.h>
#include <colorpalettes.h>
#include <colorutils.h>
#include <controller.h>
#include <delay.h>
#include <dmx.h>
#include <FastLED.h>
#include <fastpin.h>
#include <fastpin_arm_k20.h>
#include <fastpin_arm_sam.h>
#include <fastpin_avr.h>
#include <fastspi.h>
#include <fastspi_arm_k20.h>
#include <fastspi_arm_sam.h>
#include <fastspi_avr.h>
#include <fastspi_bitbang.h>
#include <fastspi_dma.h>
#include <FastSPI_LED2.h>
#include <fastspi_nop.h>
#include <fastspi_ref.h>
#include <hsv2rgb.h>
#include <led_sysdefs.h>
#include <lib8tion.h>
#include <noise.h>
#include <pixeltypes.h>
#include <power_mgt.h>
#include <smartmatrix_t3.h>

void setup() {
// put your setup code here, to run once:

}

void loop() {
// put your main code here, to run repeatedly:

}

I think all you need is

#include <FastLED.h>

not all the other includes.

Well, that does help significantly, leaves only one error as shown in this paste: http://pastebin.com/sJFZ4XPZ

That looks like an error arising from the new Arduino 1.6 and the associated new gcc compiler. We haven’t done much testing there yet.

If you can, try an older version of the Arduino IDE, maybe the 1.0.X version or 1.5.X.

I could, and did. 1.5.8 BETA gave me the exact same error as 1.6.0 and 1.0.6 outputs something completely different. http://pastebin.com/VA6N61Jf

Great! OK, now it looks like all you have to do is define your setup() and loop() functions. The error message that makes me think that is this:

In function main': C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/main.cpp:40: undefined reference tosetup’
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/main.cpp:43: undefined reference to `loop’

Try one of the FastLED example programs as a starting point!

You mean the examples like blink and such right?

I’d run the blink example that’s included with the Arduino IDE first so that you know your basic environment is installed/running OK. This can be found at http://arduino.cc/en/tutorial/blink

In order to test FastLED, Mark’s referring to his FirstLight example as found at:

Here’s a modification that works with my APA102’s:

Okay, when running the included Blink example I noticed one of the leds turning red > white every 30 seconds or so. So I tried modifying the FirstLight making it look like this:

http://pastebin.com/VXahNPKc

While doing that I noticed your mod set the data pin to pin 12, where I’ve read that it should be 13. Either way, running that mod makes the onboard LED go berserk. That onnboard LED also succesfully ran the Blink test.

The on board LED is connected to pin 13.
So what you are seeing is the data line passing through the on board led, and it lighting it PWM style.

So, the question I’d be asking is:

  1. Did your firstlight compile?
  2. If so, what were the results (besides the PWM on pin 13)?
  3. If your APA102’s are not working correctly, I’d start looking into the wiring and power.

For instance:

There’s an input and an output to your LED string. Make sure you know which is which.

That’s a long string of LED’s, so they’ll need to be powered by a dedicated 5V power source. Not 7V, not 3V, but 5V.

Finally, here’s an article I’ve been working on:

http://www.tuline.com/dru/content/my-fastled-faq

The string itself is flawless as I had it running on a Raspberry, 5v coming straight from a molex adapter. The wiring can’t possibly be an issue here. Every software thing I’ve tried is already in here, but I will check out that FAQ post :blush:

Hmm, just got back today to do another checkup, seems like I actually did flip the connector pins on the board .’. Anyway, will be rechecking the wiring again this week as it seems to be not as stable as I thought it was.

Check it 3 times.

Will definately be doing that, the one modified LED script has been running smooth for a while now. Big day tomorrow :slight_smile:

So I redid the wiring / soldering with shorter pieces between strips and they are just working like a charm now. The next step for me would be getting either Adalight or AmbiLED running in Ambibox using the APA-102’s. I have already filed a request at Adalight and Ambiled wherever possible. Or do you perhaps know a way to get this to work?