New Library: DycoLed for Arduino

responding only at some issues,

The answer is easy. What sense would it make to control zero leds? I agree with you that MAXLEDS is a bit oversized, could change this to 1 or leave it like so.

I would make it explicit zero because this value is used for testing in other functions. setLEd() in particular

It is not possible to set the pins, now you are using 1 and 2 where pin 1 is allready part of the serial port....
This is the price of an early release ... I've tested the code only on one ATtiny85 right now. Last week I changed from software bit-banging to hardware output (USI). In a later (the next?) version of the library I will add support for real SPI and software mode.

OK, fair enough - however you can easily create a constructor with params and set these default to 1 and 2 (so UNO people can overrule)

[bug 2x]
void DycoLed::setLed(unsigned int led, byte value[3]) {
if (led <= LEDCOUNT) {
if LEDCOUNT == 1 the only valid number is 0
Not right, 1 would be true, too. (smaller or equal to LEDCOUNT)

disagree if you fill in MAXLEDS in the constructor that would be accepted, but your internal arrays go from 0..Maxleds-1 (read the chapters about arrays in C/C++) That would be one missing.

You have a double administration one for easy setting and one for sending.
You can win 60+bytes footprint by removing the ledMessage Array's. You could then also remove the complete update() function.
Yes and no smiley-wink
I had the just-in-time calculation in a very early stage of writing the code. But I thougt that pre-calculating all values and just sending them out at the desired time would be better. I will think about this again later.

You can also precalculate the values in setLed so that the both arrays are allways ready to be send.

issing the function getLed(&r &g & b);
What do you mean exactly? To get the values of a specific led ( getLed(byte led) with an array return)? Or to search for one led with the matching color values (returning index of led)?

I would like to request the color back from the LED. The array holds the value so why should I keep it.

Request for a new function
AddLed(r,g,b);
shifts all LED values in the internal array and places this RGB at index 0. Easy to create a moving light show !