Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

A-Star 32U4 Prime LV + APA102 LED strip -- proper pins?



Just starting out with electronics on this low level and need a little nudge in the right direction.

I have a Raspberry Pi 3 with the A-Star 32U4 Prime LV attached off of it via USB. I have six 2m APA102 [120] LED strips daisy-chained off of it. When I first set it up, I was able (after some quick downloads of FastLED, APA102, and a couple other libraries) to get the rainbow snaking pattern to lazily flow over all six strips and back. This was with my Data_Pin on 1 and Clock_Pin on 2.

After letting the project sit for a month or so I’ve returned to it and was able to load the BRIGHTNESS sketch, but since then I’ve been unable to get the LEDs to respond to any sketches I throw at it. (Despite no errors upon validation or uploading… it just uploads and nothing happens/changes with the lights)

I was wondering if it’s down to having an optimal pin selection on the A-Star? I’ve moved the pins around abit, but there hasn’t been any change. I’ve looked at the schematic graphic for the pinouts, but it’s all sort of greek to me. From some of my reading, it sounds like my best bet is to use SPI which, if I’m reading the schematic correctly are the 6 pins located in the "ISP’ bit of the board, but if I’m not looking for optimal performance, should any two of the numbered pins work (providing they’re specified in the sketch correctly)?

I’m attaching a picture of my current setup where the Data and Clock pins are set to 11 and 12 respectively.

The short term goal is just to be able to load sketches that work with APA102s and longer term to use my 6x120 LED strips to create a sort of mini-ticker that can scroll text.




Our library uses software SPI rather than hardware SPI, so it should not matter what pins you use to communicate with the APA102 LED strips. How are you powering your six LED strips? Are you trying to power them all in a single chain? Could you double check that your connections to the data and clock lines on the LED strip are not switched?



Hello Claire,

Thanks for the reply! It’s great to know that I don’t have to worry about any particular pin combo. I’ve normally been using 1 for the DATA_PIN and 2 for the CLOCK_PIN but after numerous fruitless efforts I began to try different pin combos thinking that in the various sketches I uploaded/compiled, the example pin numbers in the sketch could perhaps be indicative of a working set. :blush:

I am powering the strips individually (one 5V power connector per 2m strip). So overall I have 8 power supplies in use. 1xRaspberry Pi, 1xA-Star, 6xLED power supplies.



To make sure we are on the same page, could you use the default pins from the Rainbow example (data = 11 and clock = 12) and try running that example as is with just one strip connected. Do you see any lights at all from the strip at power on or when the example code runs? Could you try each strip that way individually? If you have access to an oscilloscope, could you look at the data and clock lines and make sure there is a signal on them?



Hi Claire,

I’ve done as requested and ran only a single strip. I’ve double checked the
cables connecting from the APA102 to the A-Star. Pins 11 (data), 12
(clock), and ground. I get a single LED powered on with the strip when
nothing is running. After verifying and uploading the Rainbow sketch,
nothing happens. (Upload finishes without error) I’ve run this on two of
my strips with the same results.

I’ve taken a 2 minute video of an attempt which I can share to an email
address if needed.



Please post your video of the test with the LED strips here. One good way to do that would be to upload the video to Youtube and post a link to it.

It would be the most helpful if your video shows your power supply and connections in it along with the behavior you get when powering up the strip and then sending it a signal.



Hi Claire,

I believe the video contains all of those components. I would strongly
prefer to send a link to an email address. Does Pololu have a role account
I can use… (e.g. support@pololu.com)?



Yes, support@pololu.com is the correct address to use.



Thank you for emailing the video. It looks like you were mixing up the clock and data wires. In general it is really easy to get wiring mixed up like that when you use the same color for each wire. I recommend getting something like a rainbow pack of wires to help prevent mix-ups in the future.



Thanks for the feedback.

I’ve carefully rewired things after getting your advice and am still not getting anything when I load up any of the apa102 sketches. I’m not sure what else I can do at this point. Perhaps I’ll look into connecting the LEDs directly to my Raspberry Pi3 and see if I can get anything working. If so I’ll add the A-Star back into the mix. I’m really perplexed.



Trying with the Raspberry Pi might be good. Let us know how it goes. If you are worried that the A-Star is the issue, you might also try running other programs on it that use the same pins to make sure they are functioning correctly. If that does not work, could you post updated pictures of your connections that clearly show where each wire is going?



Hi Claire,

Sorry for the long delay. I’ve procrastinated on testing things out. :\

Last night I worked with the A-Star again and was unable to get it to even perform the LED blink test (on its board). It also failed to display anything on the LCD screen I’ve got with it. I think it may have been toasted? I don’t have the requisite cables to test the Pi atm, but am going over to Pololu now to buy some rainbow connector cables that’ll allow me to connect to the Pi and test that directly. I may also buy a Leonardo as I’m not sure I need the extra capabilities of the A-Star to make these lights work.



You do not need the extra features of the A-Star Prime to get your LED strips working, but I do not really expect the Arduino Leonardo to be any easier to use or more robust. If you are looking for a cheaper board with less features, you might consider our A-Star Micro or an A-Star Mini instead.

Are you still able to successfully program the A-Star? Do you see a message saying done uploading in the Arduino IDE after you try programming? Have you tried a different USB cable or port?