max length of arrray

I need an array of 512 but i found this was imposible for my small brain, and after reading (not allowed to link on first post soz) I found out the arduino does not have enough ram.
The array is for a DMX controller so must be 512 places of storage each holding up to the value 255. This means I can't use the work around on the other thread.

Can any of you clever people think of a work around or do I have to completely rethink my DMX design?

If you are frugal with the rest of your variables, you can fit an array of 512 bytes in the Arduino ram. Have upu tried?

yer that was the first thing i tried :frowning: but I also need a buffer array of bout 50 so im stuck lol

a buffer of 50 bytes plus the array is still only 562 bytes.

oh mmmm and my array of 512 would be able to store up to 255 in every space? btw thanks for your amazingly quick reply

yes, you can store 512 8 bit values (0-255) in 512 bytes.

oh ok i dont know whats happening then???? id declare that like:

int myLights[512];


If you need to store 8bit values, make your array of bytes instead of ints.

byte myLights[512];

If you use an int for each element, it can store bigger numbers but takes two bytes PER ELEMENT, so that table you gave would take up 1024 bytes of memory.

oh ok stupid me thanks for your help

And if you don't need to modulate all the light you can let say:
have 25 DMX channel that have a 0-255 value and send all the rest to zero! they won't take any memory!