Created
March 4, 2013 13:33
-
-
Save aguegu/5082268 to your computer and use it in GitHub Desktop.
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
#include "Lpd6803.h" | |
Lpd6803 lpd(12, 13, 1); | |
// DIN - #12 | |
// SCK - #13 | |
// 1 pcs of lpd6803 in serial | |
void setup() | |
{ | |
} | |
void loop() | |
{ | |
static bool b = true; | |
static char grey = 0; | |
lpd.setColor(0, grey, 0x1f, 0x1f); | |
lpd.display(); | |
b ? grey++ : grey--; | |
if (grey >= 0x20) b = false; | |
if (grey < 0) b = true; | |
delay(200); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment