adafruit / Adafruit_CircuitPython_DotStar

Dotstarrin' away in CircuitPython land
MIT License
46 stars 38 forks source link

Support other color orders like NeoPixel #15

Closed RedAnon closed 6 years ago

RedAnon commented 6 years ago

APA Electronic has a new 13-bit version of the APA-102 LEDs which have a lower refresh rate (approximately 700MHz) but smoother colours. As far as I can tell there is currently no way of controlling these chips. And it would be extremely awesome if we could control them.

tannewt commented 6 years ago

I'm not sure these will need any changes. A forum user (may be @RedAnon ) is going to test next week and get back to me.

https://forums.adafruit.com/viewtopic.php?f=60&t=135009

tannewt commented 6 years ago

Mimic the NeoPixel library.

https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/blob/master/neopixel.py#L39

RedAnon commented 6 years ago

Thanks. I've already forwarded this to our company's developer and he will try to implement it.

mcscope commented 6 years ago

Mine! Working on this @ pycon sprints

RedAnon commented 6 years ago

What's your ETA @mcscope? I can't promise you we won't be faster. :P

mcscope commented 6 years ago

@RedAnon I'm working on it now @ the pycon sprints. I am wondering if your initial message (about 13 bits) was referring to the 5 bit brightness value per-pixel? I noticed this library doesn't support using it, but it's part of the spec. I'm opening another issue for that because this one is about color order now.

mcscope commented 6 years ago

other issue about pixel brightness value: https://github.com/adafruit/Adafruit_CircuitPython_DotStar/issues/16

RedAnon commented 6 years ago

@mcscope Yes it was. AFAIK the driver right now simply sends a fixed value but people from APA USA told me that this should only work for their 8-bit LEDs (even tho it plainly works for the 13-bit ones as well as I've demonstrated on the Adafruit forums). The plan right now for us is to tackle that (#16) issue as well and our in-house developer is investigating it as we speak. It's just that we've wanted to start with something easier but it seems you've already solved that. :)

mcscope commented 6 years ago

@RedAnon I'm not seeing anything about a 13 bit version of this strip anywhere. Are you adding the 5 bit brightness value to one of the 8 bit color values to get 13?

mcscope commented 6 years ago

PR: https://github.com/adafruit/Adafruit_CircuitPython_DotStar/pull/18

RedAnon commented 6 years ago

@mcscope APA-102-2020 (8-Bit version, same page for both the 6 and the 8 pad chips) - Genuine part APA-102-2020-8192-8 (13-Bit version, 8 pad chips) - Genuine part Forum thread where I've tested the 13-Bit strips with 8-Bit code.

And yes, as far as I know the 5-Bit value added to the 8-Bit colour plays an important role in fully utilizing the 13-Bit chips. Problem is the data from the manufacturer are a bit sketchy. For example they were adamant that sending 8-Bit code to 13-Bit LEDs would never ever work but it does...

tannewt commented 6 years ago

Fixed by #18