SOLVED Addressable LED Library that Conserves Memory

Has anyone written a library like the NeoPixel one for addressing the LEDs that doesn't take 3 bytes per LED?

I realize that you need 3 bytes to represent 3 colors, but for some applications, you don't need that. For example:

  • Send x pixels and repeat them for the entire strip
  • Represent colors in a smaller number of bits to conserve space
  • Represent patterns in flash memory so you can send them to the strip

I looked at the driver code, and I do understand the protocol sent to the LED strip, but I'm not quite up to tackling the assembly language programming required. I may try my hand at some point, but not now.

You are really limited to the length of the strip you can use with low-memory chips

The data written to the strips takes 24 bits per IC, 8 bits for each color. 8 bits is one byte; 24 bits is three bytes. Every 24 bits of data sent to the strip, represents an IC. So there is no way to get around the requirement...

The IC expects a certain amount of data(bits, bytes) per led pixel, so writing less data to the IC won't allow it to function...

Look at a ws2812 data sheet, and it will tell you exactly how much data needs to be sent to each pixel.

Get a teensy and a level shifter and you can control well over over 1500 pixels..

Qdeathstar:
The data written to the strips takes 24 bits per IC, 8 bits for each color. 8 bits is one byte; 24 bits is three bytes. Every 24 bits of data sent to the strip, represents an IC. So there is no way to get around the requirement...

The IC expects a certain amount of data(bits, bytes) per led pixel, so writing less data to the IC won't allow it to function...

Look at a ws2812 data sheet, and it will tell you exactly how much data needs to be sent to each pixel.

I know that. But you don't have to have it in memory. For example I could send the strip a repeating pattern of 5 colors and the strip could be any length.

As for using a Teensy, I'd rather use a $1 attiny85.

How are you going to write it to the strip if its not in memory?

Qdeathstar:
How are you going to write it to the strip if its not in memory?

Part would be in memory. If I wanted to make a repeating pattern of 5 colors to a strip 1000 pixels long, I would send the same 5 colors over and over until I sent 1000 colors.

It would be easy to do if I knew avr assembly. The data stream is simple enough

Yous have to convert the data from flash memory to SRAM, and send instructions to send the data in under a microsecond.

Edit:

Qdeathstar:
Driving 1000 NeoPixels With 1k Of Arduino RAM | Hackaday

Yes! This is exactly what I need. A way to send the Bitstream in C. Thank you.