Grayscale fading and brightness changes.

Fixed the basic test code to run single brightness level by default,
added the option of the grayscale fading, and slowed it way the hell
down.
This commit is contained in:
jprodgers
2015-05-29 16:16:29 +02:00
parent 04f8c1ad87
commit 87417ee974
@@ -33,7 +33,9 @@
//Initialized in setup.
//Sets the time each frame is shown (milliseconds)
const unsigned int blinkdelay = 1000 / 50;
const unsigned int blinkdelay = 75;
boolean fadeMode = false;
byte brightness = 7; //Brightness goes from 0-7
/*
The BitMap array is what contains the frame data. Each line is one full frame.
@@ -128,11 +130,14 @@ PROGMEM const uint16_t BitMap[][9] = {
};
void setup() {
LedSign::Init(DOUBLE_BUFFER | GRAYSCALE); //Initializes the screen
LedSign::Init(GRAYSCALE); //Initializes the screen
}
void loop() {
if(fadeMode)
for (uint8_t gray = 1; gray < SHADES; gray++)
DisplayBitMap(gray); //Displays the bitmap
else DisplayBitMap(brightness); //Displays the bitmap
}
void DisplayBitMap(uint8_t grayscale)