Home Code LoL Shield – more examples

LoL Shield – more examples

by shedboy71

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

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More