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
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.