Categories

Follow Us

LoL Shield – more examples

random LEDs on using the LOLShield and an Arduino

LoL Shield

 

Switch LEDS off and on by column

#include <Charliplexing.h>

void setup()
{
LedSign::Init(); // initializes the screen
}

void loop()
{
for (int x=0; x<14; x++)
{
for (int y=0; y<9; y++)
{
LedSign::Set(x,y,1); // turns on LED at x,y
delay(50);
}
}
delay(500);
for (int x=0; x<14; x++)
{
for (int y=0; y<9; y++)
{
LedSign::Set(x,y,0); // turns on LED at x,y
delay(50);
}
}
delay(500);

}

Now switch the LEDS on and off by rows

#include <Charliplexing.h>

void setup()
{
LedSign::Init(); // initializes the screen
}

void loop()
{
for (int y=0; y<9; y++)
{
for (int x=0; x<14; x++)
{
LedSign::Set(x,y,1); // turns on LED at x,y
delay(50);
}
}
delay(500);
for (int y=0; y<9; y++)
{
for (int x=0; x<14; x++)
{
LedSign::Set(x,y,0); // turns on LED at x,y
delay(50);
}
}
delay(500);

}
Share

Comments are closed.