Created
May 17, 2012 04:06
-
-
Save smarthall/2716231 to your computer and use it in GitHub Desktop.
PhotoMapDisplay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//We always have to include the library | |
#include "LedControl.h" | |
LedControl lc=LedControl(10,11,12,1); | |
unsigned long delaytime=100; | |
void setup() { | |
Serial.begin(9600); | |
Serial.print("Booting..."); | |
lc.shutdown(0,false); | |
/* Set the brightness to a medium values */ | |
lc.setIntensity(0,8); | |
/* and clear the display */ | |
lc.clearDisplay(0); | |
for(int row=0;row<8;row++) { | |
for(int col=0;col<8;col++) { | |
delay(50); | |
lc.setLed(0,row,col,false); | |
} | |
} | |
Serial.println(" Done!"); | |
} | |
void single() { | |
int row = random(0,2); | |
int col = random(0,8); | |
int on = random(0,2); | |
delay(50); | |
lc.setLed(0,row,col,on); | |
} | |
void loop() { | |
single(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment