I'd like to preface this with the fact that I am new to programming and I have looked for and found examples that use a similar structure to mine but I am struggling to understand how to implement said examples into my code.
The RGB led strip driver that I purchased comes with the following example code, but I would like to know how to assign the (100, 0, 0) value a label of "red" so that I can simply use it in place of the numbers.
{
Driver.begin();
Driver.SetColor(100, 0, 0); //Red
Driver.end();
delay(500);
Driver.begin();
Driver.SetColor(0, 100, 0); //Green
Driver.end();
delay(500);
Driver.begin();
Driver.SetColor(0, 0, 100);//Blue
Driver.end();
delay(500);
}
I would like to do something along the lines of this:
{
Driver.begin();
Driver.SetColor(red); //Red
Driver.end();
}