Neopixel library not work on Particle P2

I am trying to test RGB example code for APA104 led.

So, i used “neopixel.h” library for that but it shows error that "#error “*** PLATFORM_ID not supported by this library.”

So, i am trying to search for other library’s that support that P2 platform ID = 32 ,but i can’t found.
also try other libraries like
“FastLED.h”
“neopixelblush.h” etc…

So, can anyone have particular library for RGB led strip or matrix that support Particle P2
or have any other solution for that.

Hi, this can be super hard, the FastLED and Neopixel will not work for sure. Here is what I found for RTL8721DM:

(APA104 should work with WS2812B)

But to be honest I don’t know how to port this for Photon 2. I’ll need more time and the Photon 2 which I don’t have. Also what is important you will lose your SPI functionality as this implementation use SPI to drive the leds

The existing port definitely won’t work because there are timing-sensitive loops in it. The GPIO on the RTL8720D is slow and bit-banging the output probably won’t work very well anyway.

The SPI peripheral trick is probably going to be the best way to do it, but I’m not sure it can be done entirely from user firmware.

1 Like

Now that the Photon 2 early samples have been in users hands for a little while, do you know if anyone has ported a neopixel library? I would like to transition my IoT class at cnm.edu to the Photon 2, but we rely heavily on neopixels. I’m starting to look into the SPI method, but I don’t have a lot of SPI experience, so I figured I’d ask before getting too lost in the wilderness.

There is currently no NeoPixel library for the P2/Photon 2, but it is something that is being investigated.

The problem is that the GPIO on the RTL872x is slow, even though the MCU has a fast clock speed. This means that it is not possible to brute-force (“bit-bang”) the NeoPixel protocol. It may be possible to use the SPI peripheral and DMA to implement the protocol, which is the preferred method anyway, because it’s far more efficient and allows the MCU to continue performing other tasks while outputting the pixel data with precise timing.

1 Like