Skip to content

Instantly share code, notes, and snippets.

@aguegu
Created March 4, 2013 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aguegu/5082268 to your computer and use it in GitHub Desktop.
Save aguegu/5082268 to your computer and use it in GitHub Desktop.
#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