Just noticed a small bug in the Arduino (I've tested) implementation of AP102C component.
A simple single strand of LEDs connected to SPI (hardware) works AOK - if you remember to set B2 to output.
- But I noticed that one LED was not lit.
Rather than counting to 60 (ran out of fingers) - I reset the strip length to 10 - and only 9 LEDs are lit at the start of the strand.
Note that all the LEDs are functional - (setting the strand length to 61 lights all the LEDs although there are only 60)
There isn't a 'hidden' LED at the start of the strand.
The C code looks OK - for SetAllLEDColour and Refresh. (while FCL_INDEX < 10 - gives 0..9)
The Adafruit strandtest works correctly....
Martin
AP102 LEDs
Moderator: Benj
-
- Valued Contributor
- Posts: 1189
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 439 times
- Contact:
Re: AP102 LEDs
The cause of this is the lack of an end frame in Refresh()..
From the data sheet: So adding my own refresh macro which adds an end frame: - and the correct number of LEDs now illuminated..
Martin
From the data sheet: So adding my own refresh macro which adds an end frame: - and the correct number of LEDs now illuminated..
Martin
-
- Posts: 198
- Joined: Sun Nov 04, 2018 7:13 pm
- Has thanked: 27 times
- Been thanked: 33 times
- Contact:
Re: AP102 LEDs
Thanks for looking at this. At some point I am going to be using a bunch of apa102s.
Chad
Chad
-
- Valued Contributor
- Posts: 1189
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 439 times
- Contact:
Re: AP102 LEDs
Not quite a complete fix - needs the bit-bang alternative too! Hopefully easy for Ben & co to incorporate.
I've been trying (and failing) to get them working with an ATTiny85...
Martin
I've been trying (and failing) to get them working with an ATTiny85...
Martin
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: AP102 LEDs
Brilliant, Thanks for letting us know and well done for finding the cause of the problem.
I've added the End Frame to the refresh function now and pushed the fix to the update system.
Let me know how you get on.
I've added the End Frame to the refresh function now and pushed the fix to the update system.
Let me know how you get on.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel