Hi everyone,
I have been using arduinos for years, but have very limited knowledge on how to write my own programs for them. I usually modify other programs that I find online. I recently got a strip of addressable leds from radioshack for a price I couldn't turn down. The program that they have written works good, but I want to modify it. It uses large paragraphs of code like this
PROGMEM const unsigned long pattern_test_red[10][10]={
{0xff0000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
{0x000000,0xff0000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
{0x000000,0x000000,0xff0000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
{0x000000,0x000000,0x000000,0xff0000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000},
{0x000000,0x000000,0x000000,0x000000,0xff0000,0x000000,0x000000,0x000000,0x000000,0x000000},
{0x000000,0x000000,0x000000,0x000000,0x000000,0xff0000,0x000000,0x000000,0x000000,0x000000},
{0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xff0000,0x000000,0x000000,0x000000},
{0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xff0000,0x000000,0x000000},
{0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xff0000,0x000000},
{0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xff0000},
};
I want to do something similar, but instead of having hex values for the numbers, I want to have the name of the color in place of the hex value for the color. So I need a way of telling the arduino that Blue is 0x00ff00 so that it can refer to that while reading the paragraph.
I have done a decent amount of reading and experimenting trying to get this to work, but I am a college student and don't have a ton of time to figure this out. Could anyone tell me how I could do this? Is it even possible to do what I want to, or does it need the hex values there?
Thanks!