Hi,
Trying to figure out how to write a library for numerous boolean arrays. Not sure how to get started or the syntax.
Code we are using is here http://www.instructables.com/id/8-LED-Larson-Scanner-with-Arduino/
Besides the larson array in the above link, we would like to add several more arrays like these :
boolean alternatblink[][NUMBER_OF_LEDS] = {
{HIGH, LOW, HIGH, LOW,HIGH, LOW, HIGH, LOW, HIGH, LOW},
{HIGH, LOW, HIGH, LOW,HIGH, LOW, HIGH, LOW, HIGH, LOW},
{HIGH, LOW, HIGH, LOW,HIGH, LOW, HIGH, LOW, HIGH, LOW},
{HIGH, LOW, HIGH, LOW,HIGH, LOW, HIGH, LOW, HIGH, LOW},
{LOW, HIGH, LOW, HIGH, LOW, HIGH, LOW, HIGH, LOW, HIGH},
{LOW, HIGH, LOW, HIGH, LOW, HIGH, LOW, HIGH, LOW, HIGH},
{LOW, HIGH, LOW, HIGH, LOW, HIGH, LOW, HIGH, LOW, HIGH},
{LOW, HIGH, LOW, HIGH, LOW, HIGH, LOW, HIGH, LOW, HIGH},
};
boolean chase_right[][NUMBER_OF_LEDS] = {
{ HIGH, LOW, LOW, LOW, LOW, LOW, LOW, LOW, LOW, LOW},
{ LOW, HIGH, LOW, LOW, LOW, LOW, LOW, LOW, LOW, LOW},
{ LOW, LOW, HIGH, LOW, LOW, LOW, LOW, LOW, LOW, LOW},
{ LOW, LOW, LOW, HIGH, LOW, LOW, LOW, LOW, LOW, LOW},
{ LOW, LOW, LOW, LOW, HIGH, LOW, LOW, LOW, LOW, LOW},
{ LOW, LOW, LOW, LOW, LOW, HIGH, LOW, LOW, LOW, LOW},
{ LOW, LOW, LOW, LOW, LOW, LOW, HIGH, LOW, LOW, LOW},
{ LOW, LOW, LOW, LOW, LOW, LOW, LOW, HIGH, LOW, LOW},
{ LOW, LOW, LOW, LOW, LOW, LOW, LOW, LOW, HIGH, LOW},
{ LOW, LOW, LOW, LOW, LOW, LOW, LOW, LOW, LOW, HIGH},
};
Been looking at the library toturials but have been having trouble wrapping my head around them. Appreciate any constructive comments.
Thanks,