diff --git a/BadgeCode/BadgeCode.ino b/BadgeCode/BadgeCode.ino new file mode 100644 index 0000000..749a184 --- /dev/null +++ b/BadgeCode/BadgeCode.ino @@ -0,0 +1,838 @@ +#include + + +/* + 06/03/2017 + Author: Badge Pirates (FG, RIXON, NETWORKGEEK) + Platforms: ESP32 + Language: C++ + File: BadgeCode.ino + ------------------------------------------------------------------------ + Description: + SECKC DC25 Badge using ESP32 Thing and OLED display + ------------------------------------------------------------------------ +*/ + + +#include +#include +#include +#include + +// BOB LOGO +static unsigned char BobSmall[] PROGMEM ={ +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0xF0, 0xF0, 0xF8, +0xF8, 0xF8, 0xF0, 0xF0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xE0, 0xE0, +0xF0, 0xF0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFF, 0xFF, 0x7F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, +0x7F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, 0xFC, 0xF8, 0xF8, +0xF0, 0xE0, 0xE0, 0xC0, 0xC0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE7, +0xE7, 0xE7, 0xE7, 0xC3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x7F, 0x7F, 0x7F, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, +0x07, 0x07, 0x0F, 0x1F, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0xFE, 0xFE, 0xFC, +0xFC, 0xFC, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xF0, +0xF0, 0xF0, 0xF1, 0xF3, 0xF6, 0xF6, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F, +0x3F, 0x1F, 0x0F, 0x0F, 0x07, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0x3F, 0x7F, 0x3F, 0x1F, 0x1F, 0x0F, 0x0F, 0x07, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +// SECKC LOGO +static unsigned char SecKCSmall [] PROGMEM = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x60, +0x30, 0x18, 0x18, 0x18, 0x1C, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x60, +0x30, 0x18, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x30, 0x10, 0x18, 0x18, +0x18, 0x1C, 0x1C, 0x18, 0x18, 0x18, 0x18, 0x10, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, +0x08, 0x18, 0x18, 0x10, 0x30, 0x30, 0x30, 0x30, 0x20, 0x60, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x00, +0x00, 0x00, 0xF0, 0xCC, 0xC6, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC2, 0xCC, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x00, 0xF0, 0x1C, 0x06, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x02, +0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xC0, 0x40, 0x20, 0x30, 0x78, 0xC4, 0x82, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, +0x60, 0x60, 0x60, 0x60, 0xE0, 0xE0, 0x60, 0x60, 0x60, 0x20, 0x30, 0x1F, 0x07, 0x00, 0x00, 0x00, +0x00, 0x00, 0x07, 0x19, 0x31, 0x21, 0x61, 0x61, 0x61, 0xE1, 0xE1, 0x61, 0x61, 0x61, 0x21, 0x00, +0x00, 0x00, 0x00, 0x00, 0x07, 0x1C, 0x30, 0x60, 0x60, 0x60, 0xE0, 0xE0, 0x60, 0x60, 0x60, 0x20, +0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x0C, +0x30, 0x60, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0E, 0x18, 0x30, 0x20, 0x60, 0x60, +0x60, 0xE0, 0xE0, 0x60, 0x60, 0x60, 0x60, 0x20, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, +0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xC0, 0xE0, 0xC0, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xC0, 0xC0, 0x80, 0x80, 0x80, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x06, 0x1C, 0xF0, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x30, 0x30, 0x30, 0x38, 0x30, 0x30, 0x30, 0x60, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0xFF, 0x38, 0x38, 0x38, 0x38, 0x38, 0x00, 0x00, +0x00, 0xE0, 0x78, 0x0C, 0x06, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, +0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x60, 0x30, 0x30, 0x30, 0x38, 0x30, 0x30, 0x30, +0x60, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x40, 0x20, 0x20, 0x30, 0x30, +0x38, 0x30, 0x30, 0x70, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x3F, 0x03, +0x00, 0x00, 0x00, 0x00, 0x1C, 0xFF, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, +0x1F, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x1F, 0x78, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xC1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x80, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, +0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x06, 0x06, 0x06, 0x0E, 0x0E, 0x06, 0x06, 0x06, +0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x06, 0x06, 0x06, 0x0E, 0x0E, 0x06, 0x06, 0x06, 0x06, +0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x06, 0x06, 0x06, 0x0E, 0x06, 0x06, 0x06, +0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static unsigned char SecKCFuzzy [] PROGMEM = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, +0x1F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xFE, 0xFE, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0xFC, +0xFE, 0x7E, 0x1E, 0x0E, 0x06, 0x02, 0x01, 0x00, 0x00, 0x00, 0x18, 0xFC, 0xFE, 0xFF, 0xBF, 0x0F, +0x0F, 0x0E, 0x0E, 0x0F, 0x0F, 0x0E, 0x06, 0x06, 0x06, 0x0E, 0x1E, 0xBE, 0xFE, 0xFC, 0x78, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, +0x78, 0x38, 0x78, 0x78, 0x7C, 0x7C, 0x7C, 0x7C, 0x3C, 0x3C, 0xFC, 0xFC, 0xF8, 0xF0, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, +0xFE, 0xFE, 0xFE, 0xFC, 0xF8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, 0xFE, 0x1E, +0x1E, 0x1E, 0x1E, 0x1E, 0x0E, 0x1E, 0x1E, 0x1E, 0xFC, 0xFC, 0xFC, 0x78, 0x70, 0x00, 0x00, 0x00, +0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xC7, 0xC0, 0xF0, 0xF8, 0xFC, 0xFE, 0xFF, 0xFF, 0xEF, 0x83, 0x61, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE1, 0xE1, 0xE1, 0xE0, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, +0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, +0x1F, 0x9F, 0x9F, 0x9F, 0x9F, 0x9F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x08, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, +0x60, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0x0F, 0x07, 0x03, 0x01, 0x03, 0x07, 0x07, 0xFF, 0xFF, 0xF8, +0xF0, 0xE0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0xF0, 0xE0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x0F, 0x1F, 0x1F, 0x1E, +0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1F, 0x1F, 0x0F, 0x07, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x1F, 0x1F, 0x1E, 0x1E, 0x1E, 0x1E, 0x1C, 0x18, 0x18, 0x18, +0x1C, 0x1F, 0x1F, 0x0F, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x1F, 0x1F, 0x1E, +0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1F, 0x1E, 0x0F, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, +0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0F, +0x0F, 0x0F, 0x0F, 0x0E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x1F, 0x1F, 0x1E, +0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1F, 0x1F, 0x07, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static unsigned char DCP [] PROGMEM = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFE, 0xFE, 0x3E, 0x1C, 0x70, 0x70, 0xF0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xC0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0x39, 0x11, 0x03, 0x87, 0x07, 0x23, 0xF1, 0xFF, 0xFF, +0xEF, 0x87, 0x83, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xC0, 0xE0, 0xE0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xE0, 0xC0, 0xC0, 0x80, 0x00, +0xFF, 0xFF, 0xFF, 0xE7, 0x87, 0x07, 0x3F, 0x7E, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0xFE, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xF0, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, +0x00, 0x80, 0xC0, 0xC0, 0xE0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xF0, 0xE0, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x03, 0x07, 0x0F, 0x0F, 0x0F, 0x07, 0x03, 0x03, 0x03, 0x07, 0x0F, 0x0F, 0x1F, 0x3F, 0x3F, 0x7F, +0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xE0, 0xE0, 0xE0, 0xF0, 0xF8, 0xE3, 0xC7, 0x8F, 0x9F, 0x9F, 0x9F, +0x8F, 0x8F, 0x8F, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF8, 0xFF, 0xFF, +0x7F, 0x3F, 0x1F, 0x1F, 0x0F, 0x0F, 0x07, 0x03, 0x03, 0x03, 0x07, 0x0F, 0x0F, 0x0F, 0x07, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x03, 0x07, 0x0F, 0x0F, 0x1F, 0x3F, 0x3F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xF3, 0xE0, 0xC0, 0x90, 0x90, 0x18, 0x08, 0x0C, 0x06, 0x03, 0x01, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, +0xE0, 0xE0, 0xF0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0x7F, 0x3F, 0x3F, 0x1E, 0x0C, 0x0C, 0x01, 0x03, +0x07, 0x07, 0x0F, 0x0F, 0x1F, 0x3F, 0x3F, 0x7F, 0xFE, 0xFE, 0xFC, 0xFC, 0xF8, 0xF0, 0xE0, 0xE0, +0xC0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x38, 0x7C, 0xFE, 0xFE, 0xFE, 0xFC, 0xF8, 0xF8, 0xF8, 0xFC, 0xFE, 0xFF, 0x7F, 0x3F, 0x3F, 0x1F, +0x0F, 0x0F, 0x07, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x07, 0x0F, 0x0F, +0x1F, 0x3F, 0x3F, 0x7F, 0xFE, 0xFE, 0xFC, 0xF8, 0xF8, 0xF8, 0xFE, 0xFE, 0xFE, 0xFE, 0x7C, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x3F, 0x7F, 0xFF, 0xFF, 0x7F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x7F, 0xFF, 0xFF, 0x7F, 0x3D, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static unsigned char DCXXV [] PROGMEM = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xE0, 0xE0, 0xE0, 0x20, 0x20, 0x20, 0x20, 0x00, 0x40, +0x40, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, +0x40, 0x00, 0x20, 0x20, 0x00, 0x40, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x20, 0x60, 0xE0, 0xE0, 0xE0, +0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xE0, 0x60, 0x20, 0x00, 0x00, 0x00, 0x20, 0x20, 0xE0, +0xE0, 0xE0, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xE0, 0x60, 0x20, 0x00, 0x00, 0x00, +0x20, 0xE0, 0xE0, 0xE0, 0xE0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0xE0, 0x20, +0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x0F, 0xFF, 0xFE, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFE, 0xFF, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x0F, +0x3E, 0xFC, 0xF0, 0xF0, 0x90, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x07, 0x1F, 0x3E, 0xF8, 0xF0, 0xF0, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x07, 0x3F, 0xFF, 0xF8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x30, 0x06, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +0xC0, 0x60, 0x7C, 0x3F, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x3F, 0x7F, 0xE0, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, 0x10, 0x04, +0x02, 0x01, 0x01, 0x07, 0x0F, 0xFE, 0xF8, 0xF0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, +0x20, 0x08, 0x04, 0x00, 0x01, 0x03, 0x07, 0x1F, 0xFE, 0xF8, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x03, 0x1F, 0xFF, 0xF8, 0xF0, 0x30, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, +0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + + + +// Debug +const int debug = 0; // set to 1 to turn on debugging +const int debugnav = 0; // set to 1 to turn on navigation debuging + +// DEFINE BUTTONS +const int buttonOnBoard = 0; // the number of the pushbutton pin +const int buttonUp = 14; // the number of the pushbutton pin +const int buttonDown = 12; // the number of the pushbutton pin +const int buttonRight = 13; // the number of the pushbutton pin +const int buttonLeft = 27; // the number of the pushbutton pin +const int ledPin = 5; // the number of the LED pin + +// variables will change: +int buttonUpState = 0; // variable for reading the pushbutton status +int buttonDownState = 0; +int buttonRightState = 0; +int buttonLeftState = 0; +int buttonOnBoardState = 0; +int screenBrightness = 1; +int firstBoot = 0; + +//wifi variables +int wifiStatus = 0; + +// Menu Variables +//Set position variables + int currentMenuPos = 1; + int previousMenuPos = 0; + int menuPosSelected = 0; + int menuNumItems = 0; + int menuNumber = 0; + int previousMenuNumber = 0; + char menuIndicator[ ] = "*"; + +// Setup Debouncing for buttons +Bounce debounceButtonUp = Bounce(); +Bounce debounceButtonDown = Bounce(); +Bounce debounceButtonRight = Bounce(); +Bounce debounceButtonLeft = Bounce(); +Bounce debounceButtonOnBoard = Bounce(); +int debounceInterval = 10; + +// Wifi Settings +char ssid[]="SecKC_Badge"; //SSID + +void setup() +{ + Serial.begin(9600); + // initialize the LED pin as an output: + pinMode(ledPin, OUTPUT); + // initialize the pushbutton pin as an input: + pinMode(buttonUp, INPUT_PULLUP); + debounceButtonUp.attach(buttonUp); + debounceButtonUp.interval(debounceInterval); + pinMode(buttonDown, INPUT_PULLUP); + debounceButtonDown.attach(buttonDown); + debounceButtonDown.interval(debounceInterval); + pinMode(buttonRight, INPUT_PULLUP); + debounceButtonRight.attach(buttonRight); + debounceButtonRight.interval(debounceInterval); + pinMode(buttonLeft, INPUT_PULLUP); + debounceButtonLeft.attach(buttonLeft); + debounceButtonLeft.interval(debounceInterval); + pinMode(buttonOnBoard, INPUT); + debounceButtonOnBoard.attach(buttonOnBoard); + debounceButtonOnBoard.interval(debounceInterval); + + // Initialze SSD1306 OLED oled + Wire.begin(); + oled.init(); + oled.setHorizontalScrollProperties(Scroll_Left,72,95,Scroll_2Frames); + oled.clearDisplay(); + +} + +void drawBob() +{ + if (debug == 1){ + Serial.println ("Draw Bob Called"); + } + + digitalWrite(ledPin, HIGH); + oled.drawBitmap(BobSmall,1024); // 1024 pixels for logo + +} + +void drawCredits() +{ + if (debug == 1){ + Serial.println ("Draw Credits Called"); + } + oled.clearDisplay(); + oled.setTextXY(0,0); + oled.putString ("****Credits****"); + oled.setTextXY(2,0); + oled.setTextXY(3,0); + oled.putString (" fg"); + oled.setTextXY(4,0); + oled.putString (" rixon"); + oled.setTextXY(5,0); + oled.putString (" networkgeek"); + delay(4000); + oled.clearDisplay(); // clear the display ahead of the menu + returnToMenu(menuNumber); +} + +void drawSponsors() +{ + if (debug == 1){ + Serial.println ("Draw Sponsors Called"); + } + oled.clearDisplay(); + oled.setTextXY(0,0); + oled.putString ("***************"); + oled.setTextXY(1,0); + oled.putString (" SecKC"); + oled.setTextXY(2,0); + oled.putString ("Defcon 25 Badge"); + oled.setTextXY(5,0); + oled.putString ("BadgePirates.com"); + delay(2000); + oled.clearDisplay(); // clear the display ahead of the menu + returnToMenu(menuNumber); +} + +void drawTwitterCredits() +{ + if (debug == 1){ + Serial.println (" Draw TwitterCredits Called"); + } + oled.clearDisplay(); + oled.setTextXY(0,0); + oled.putString ("***************"); + oled.setTextXY(1,0); + oled.putString ("#BadgeLife"); + oled.setTextXY(2,0); + oled.putString ("#SecKC"); + oled.setTextXY(3,0); + oled.putString ("#DefConParties"); + oled.setTextXY(5,0); + oled.putString ("BadgePirates.com"); + delay(2000); + oled.clearDisplay(); // clear the display ahead of the menu + returnToMenu(menuNumber); +} + +void drawSecKC() +{ + if (debug == 1){ + Serial.println ("Draw SecKC Called"); + } + + digitalWrite(ledPin, LOW); //LED is OFF + oled.clearDisplay(); // clear the display SecKC DefCon Bitmap + oled.drawBitmap(SecKCSmall,1024); //Display SecKC DefCon Words + delay(2000); + menuPosSelected = 0; // reset the menu selection + oled.clearDisplay(); + returnToMenu(menuNumber); +} + +void drawSecKCFuzzy() +{ + if (debug == 1){ + Serial.println ("Draw 5ecKC Called"); + } + + digitalWrite(ledPin, LOW); //LED is OFF + oled.clearDisplay(); // clear the display SecKC DefCon Bitmap + oled.drawBitmap(SecKCFuzzy,1024); //Display SecKC DefCon Words + delay(2000); + menuPosSelected = 0; // reset the menu selection + oled.clearDisplay(); + returnToMenu(menuNumber); +} + +void drawBling() +{ + if (debug == 1){ + Serial.println ("Draw Bling Called"); + } + int repeat = 1; + while (repeat > 0) { + digitalWrite(ledPin, LOW); //LED is OFF + oled.clearDisplay(); // clear the display SecKC DefCon Bitmap + oled.drawBitmap(SecKCFuzzy,1024); + delay(2000); + oled.drawBitmap(BobSmall,1024); + delay(2000); + oled.drawBitmap(DCXXV,1024); + delay(2000); + oled.drawBitmap(DCP,1024); + delay(2000); + menuPosSelected = 0; // reset the menu selection + oled.clearDisplay(); + } +} + +void returnToMenu(int menuNumber) +{ + // Menu 1 (Top) + if (menuNumber == 1) { + topMenu(); + } + + if (menuNumber == 2) { + settingsMenu(); + } +} + +void topMenu() +{ + + if (debug == 1){ + Serial.println ("Top Menu Called"); + } + oled.clearDisplay(); // Get screen ready for new menu + oled.setTextXY (0,3); + oled.putString ("==MENU=="); + oled.setTextXY (1,2); + oled.putString ("1. Bling Mode"); + oled.setTextXY (2,2); + oled.putString ("2. Credits"); + oled.setTextXY (3,2); + oled.putString ("3. -----"); + oled.setTextXY (4,2); + oled.putString ("4. Settings"); + oled.setTextXY (1,1); + menuNumItems = 4; // Allow for navigation to iterate through the correct number of positions + menuNumber = 1; // Each menu needs a unique ID for the cases to switch the correct function + if (firstBoot == 0) { + menuNavigation(menuNumber, menuNumItems); + } +} + + +void settingsMenu() +{ + + if (debug == 1){ + Serial.println ("Settings Menu Called"); + } + currentMenuPos = 1; + menuPosSelected = 0; // Reset flag from call to function + oled.clearDisplay(); // Get screen ready for new menu + oled.setTextXY (0,3); + oled.putString ("==Settings=="); + oled.setTextXY (1,2); + oled.putString ("1. LCD Low"); + // Set value indicator if brightness == low + if (screenBrightness == 0) { + oled.setTextXY (1,15); + oled.putString ("*"); + } + + oled.setTextXY (2,2); + oled.putString ("2. LCD High"); + // Set value indicator if brightness == high + if (screenBrightness == 1) { + oled.setTextXY (2,15); + oled.putString ("*"); + } + + oled.setTextXY (3,2); + oled.putString ("3. Wifi On"); + // Set value indicator if WIFI == high + if (wifiStatus == 1) { + oled.setTextXY (3,15); + oled.putString ("*"); + } + + oled.setTextXY (4,2); + oled.putString ("4. Wifi Off"); + // Set value indicator if brightness == low + if (wifiStatus == 0) { + oled.setTextXY (4,15); + oled.putString ("*"); + } + + oled.setTextXY (1,1); + menuNumItems = 4; // Allow for navigation to iterate through the correct number of positions + menuNumber = 2; // Each menu needs a unique ID for the cases to switch the correct function + menuNavigation(menuNumber, menuNumItems); +} + + +void menuNavigation(int menuNumber, int menuNumItems) +{ + + +if (debug ==1) { + Serial.print ("Menu Number: "); + Serial.println (menuNumber); + Serial.print ("Current Pos: "); + Serial.println (currentMenuPos); +} + +// topMenu Navigation +if (menuNumber == 1 && menuPosSelected == 1 && currentMenuPos == 1) { + drawBling(); + } + + if (menuNumber == 1 && menuPosSelected == 1 && currentMenuPos == 2) { + drawCredits(); + } + + if (menuNumber == 1 && menuPosSelected == 1 && currentMenuPos == 3) { + drawTwitterCredits(); + } + + if (menuNumber == 1 && menuPosSelected == 1 && currentMenuPos == 4) { + settingsMenu(); +} + +// Settings Menu Navigation... + +// Settings Navigation + if (menuNumber == 2 && menuPosSelected == 1 && currentMenuPos == 1) { + oledBrightnessLow(); + } + + if (menuNumber == 2 && menuPosSelected == 1 && currentMenuPos == 2) { + oledBrightnessHigh(); + } + + if (menuNumber == 2 && menuPosSelected == 1 && currentMenuPos == 3) { + wifiOn(); + } + + if (menuNumber == 2 && menuPosSelected == 1 && currentMenuPos == 4) { + wifiOff(); + } + +// Track the Menu positions and update the cursor +if (debugnav == 1) { + Serial.print ("Current Menu Position: "); + Serial.println (currentMenuPos); + Serial.print ("Previous Menu Position: "); + Serial.println (previousMenuPos); +} + +if (debounceButtonDown.fell() ) { + previousMenuPos = currentMenuPos; + currentMenuPos++; +} + + +if (debounceButtonUp.fell() ) { + previousMenuPos = currentMenuPos; + if (currentMenuPos > 1) { + currentMenuPos--; + } +} + +if(debounceButtonLeft.fell() ) { + topMenu(); +} + + // Clean up for button bouncing + if (currentMenuPos > menuNumItems) { + currentMenuPos = 1; + previousMenuPos = menuNumItems; + oled.setTextXY (menuNumItems,1); + oled.putString (" "); + } + + // Remove indicator from previous location + + oled.setTextXY (previousMenuPos,1); + oled.putString (" "); + // Update Menu indicator + oled.setTextXY (currentMenuPos,1); + oled.putString (menuIndicator); + + menuPosSelected = 0; // reset the menu selection +} + +void wifiOn(){ + // start broadcsting SSID AP On + oled.clearDisplay (); + oled.setTextXY (1,2); + oled.putString ("Wifi ON"); + oled.setTextXY (2,2); + oled.putString (ssid); + WiFi.softAP(ssid, NULL, 1, 0, 1); + wifiStatus = 1; + delay (2000); + settingsMenu(); + +} + +void wifiOff (){ + // stop broadcating SSID (AP off) + oled.clearDisplay (); + oled.setTextXY (1,2); + oled.putString ("Wifi OFF"); + WiFi.softAPdisconnect(1); + wifiStatus = 0; + delay (2000); + settingsMenu(); + +} + +void oledBrightnessLow () +{ + oled.setBrightness(0); + Serial.println ("Brightness set to 0"); + Serial.print ("Menu Select flag: "); + Serial.println (menuPosSelected); + screenBrightness = 0; + returnToMenu(menuNumber); +} + +void oledBrightnessHigh() +{ + oled.setBrightness(255); + Serial.println ("Brightness set to 255"); + Serial.print ("Menu Select flag: "); + Serial.println (menuPosSelected); + screenBrightness = 1; + returnToMenu(menuNumber); +} + +void loop(){ + + +// Display BOB if this is the first boot +if (firstBoot == 0) { + drawBob(); + delay(3000); +} + + // Capture the current button status + + // check buttons using Debounce Library + // First update + + debounceButtonUp.update(); + debounceButtonDown.update(); + debounceButtonRight.update(); + debounceButtonLeft.update(); + debounceButtonOnBoard.update(); + + + buttonUpState = debounceButtonUp.read(); + buttonDownState = debounceButtonDown.read(); + buttonRightState = debounceButtonRight.read(); + buttonLeftState = debounceButtonLeft.read(); + buttonOnBoardState = debounceButtonOnBoard.read(); + + + if (debug == 1) { + Serial.println ("Button Status"); + Serial.println (""); + Serial.print ("Up:"); + Serial.println (buttonUpState); + Serial.print ("Down: "); + Serial.println (buttonDownState); + Serial.print ("Right: "); + Serial.println (buttonRightState); + Serial.print ("Left: "); + Serial.println (buttonLeftState); + } + + // Set select variable and pass it into the menu + if (debounceButtonRight.fell() ){ + menuPosSelected = 1; + } + + // Call the first menu + if (firstBoot == 0) { + topMenu(); + firstBoot++; + } + + menuNavigation(menuNumber, menuNumItems); + +} diff --git a/Files/BadgeBOM.txt b/Files/BadgeBOM.txt new file mode 100644 index 0000000..b9ed115 --- /dev/null +++ b/Files/BadgeBOM.txt @@ -0,0 +1,45 @@ +Badge BOM + +PCB Seeed Fusion 4.00 +Switch DigiKey .50 +Lipo Connector DigiKey .16 +Female Headers SparkFun 3.00 +Oled NewEgg/China 5.50 +ESP32 Thing DigiKey 19.95 +Lanyard Lanyards for all 2.50 +Lipo xxx (7.00) +Buttons sparkfun 1.25 + ------ + 43.86 + + + + + + + + + + + +On Off Switch - https://www.digikey.com/product-detail/en/EG1213/EG1906-ND/101735?WT.mc_id=IQ_7595_G_pla101735&wt.srch=1&wt.medium=cpc&&gclid=CjwKEAjwr_rIBRDJzq-Z-LC_2HgSJADoL57H2oEogJitullIAajXW2Q5gOgxdUahY-SLzEw1SfXg9xoCj9Lw_wcB + +Lipo Connector - https://www.digikey.com/product-detail/en/jst-sales-america-inc/S2B-PH-K-S(LF)(SN)/455-1719-ND/926626 + +Female headers +1. https://www.sparkfun.com/products/115?_ga=2.163844607.1333216352.1495253702-127753071.1494297406 +2. https://www.newegg.com/Product/ProductList.aspx?Submit=ENE&DEPA=0&Order=BESTMATCH&Description=female+header+10+pin&N=-1&isNodeId=1 + +OLED - I2c IIC Serial Oled LCD LED Module +1. https://www.aliexpress.com/item/Free-shipping-1Pcs-128X64-OLED-LCD-LED-Display-Module-white-For-Arduino-0-96-I2C-IIC/32671702306.html?spm=2114.10010108.1000023.4.f31VvG (2.61) +2. https://www.newegg.com/Product/Product.aspx?Item=9SIAAZM4K91701 (5.44) + +button - https://www.sparkfun.com/products/97 + +SparkFun ESP32 Thing +1. https://www.sparkfun.com/products/13907 (17.95) 25+ +2. https://www.digikey.com/product-detail/en/sparkfun-electronics/DEV-13907/1568-1444-ND/6419476 (19.95) + +Lipo Battery - ???? + +Lanyards - https://www.customlanyards4all.com/double-ended-lanyards/woven-double-ended-lanyards-detail \ No newline at end of file diff --git a/Files/LCDAssistant.zip b/Files/LCDAssistant.zip new file mode 100644 index 0000000..15bd4db Binary files /dev/null and b/Files/LCDAssistant.zip differ diff --git a/Files/SECKC dc25 BADGE.pptx b/Files/SECKC dc25 BADGE.pptx new file mode 100644 index 0000000..180b9a8 Binary files /dev/null and b/Files/SECKC dc25 BADGE.pptx differ diff --git a/Files/SecKCDC25Badge_gerber-Prod.zip b/Files/SecKCDC25Badge_gerber-Prod.zip new file mode 100644 index 0000000..9032989 Binary files /dev/null and b/Files/SecKCDC25Badge_gerber-Prod.zip differ diff --git a/Files/esp32-thing-v10.zip b/Files/esp32-thing-v10.zip new file mode 100644 index 0000000..e559b2c Binary files /dev/null and b/Files/esp32-thing-v10.zip differ diff --git a/Images/2017.jpg b/Images/2017.jpg new file mode 100644 index 0000000..b168f77 Binary files /dev/null and b/Images/2017.jpg differ diff --git a/Images/2017.png b/Images/2017.png new file mode 100644 index 0000000..646cf1b Binary files /dev/null and b/Images/2017.png differ diff --git a/Images/Badge Logo.png b/Images/Badge Logo.png new file mode 100644 index 0000000..d3cacb9 Binary files /dev/null and b/Images/Badge Logo.png differ diff --git a/Images/CpqxqtiVUAIQHi3.jpg b/Images/CpqxqtiVUAIQHi3.jpg new file mode 100644 index 0000000..2f248a3 Binary files /dev/null and b/Images/CpqxqtiVUAIQHi3.jpg differ diff --git a/Images/IMG_20170608_212221.jpg b/Images/IMG_20170608_212221.jpg new file mode 100644 index 0000000..2e695e5 Binary files /dev/null and b/Images/IMG_20170608_212221.jpg differ diff --git a/Images/IMG_20170612_193407.jpg b/Images/IMG_20170612_193407.jpg new file mode 100644 index 0000000..f443901 Binary files /dev/null and b/Images/IMG_20170612_193407.jpg differ diff --git a/Images/IMG_20170612_201030.jpg b/Images/IMG_20170612_201030.jpg new file mode 100644 index 0000000..a9e7256 Binary files /dev/null and b/Images/IMG_20170612_201030.jpg differ diff --git a/Images/Pasted image at 2017_06_04 08_48 PM.png b/Images/Pasted image at 2017_06_04 08_48 PM.png new file mode 100644 index 0000000..cfc2c6a Binary files /dev/null and b/Images/Pasted image at 2017_06_04 08_48 PM.png differ diff --git a/Images/Pasted image at 2017_06_04 10_14 PM.png b/Images/Pasted image at 2017_06_04 10_14 PM.png new file mode 100644 index 0000000..4b2d8aa Binary files /dev/null and b/Images/Pasted image at 2017_06_04 10_14 PM.png differ diff --git a/Images/Pasted image at 2017_06_12 09_26 PM.png b/Images/Pasted image at 2017_06_12 09_26 PM.png new file mode 100644 index 0000000..527aa81 Binary files /dev/null and b/Images/Pasted image at 2017_06_12 09_26 PM.png differ diff --git a/Images/Pasted image at 2017_06_15 07_00 AM.png b/Images/Pasted image at 2017_06_15 07_00 AM.png new file mode 100644 index 0000000..26a7114 Binary files /dev/null and b/Images/Pasted image at 2017_06_15 07_00 AM.png differ diff --git a/Images/SecKC DC 25 - Bones.jpg b/Images/SecKC DC 25 - Bones.jpg new file mode 100644 index 0000000..756c1d7 Binary files /dev/null and b/Images/SecKC DC 25 - Bones.jpg differ diff --git a/Images/SecKC_Hex_OnlyB.png b/Images/SecKC_Hex_OnlyB.png new file mode 100644 index 0000000..8b2069e Binary files /dev/null and b/Images/SecKC_Hex_OnlyB.png differ diff --git a/Images/image.png b/Images/image.png new file mode 100644 index 0000000..0f02fc8 Binary files /dev/null and b/Images/image.png differ diff --git a/Lanyard/SecKC DC25 Lanyard - Final.jpg b/Lanyard/SecKC DC25 Lanyard - Final.jpg new file mode 100755 index 0000000..c76cdec Binary files /dev/null and b/Lanyard/SecKC DC25 Lanyard - Final.jpg differ diff --git a/Lanyard/SecKC DC25 Lanyard - Final.pdf b/Lanyard/SecKC DC25 Lanyard - Final.pdf new file mode 100755 index 0000000..6e29f2f Binary files /dev/null and b/Lanyard/SecKC DC25 Lanyard - Final.pdf differ diff --git a/Lanyard/SecKC DC25 Lanyard v3_00.cdr b/Lanyard/SecKC DC25 Lanyard v3_00.cdr new file mode 100755 index 0000000..79fd4be Binary files /dev/null and b/Lanyard/SecKC DC25 Lanyard v3_00.cdr differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..5fd9fe1 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Badge-DC25 + +See badgepirates.com for additional info. diff --git a/References/ESP32ThingV1.pdf b/References/ESP32ThingV1.pdf new file mode 100644 index 0000000..d19a925 Binary files /dev/null and b/References/ESP32ThingV1.pdf differ diff --git a/References/GerberFile Associations.PNG b/References/GerberFile Associations.PNG new file mode 100644 index 0000000..1060169 Binary files /dev/null and b/References/GerberFile Associations.PNG differ diff --git a/References/SparkfunDems.pdf b/References/SparkfunDems.pdf new file mode 100644 index 0000000..52274a3 Binary files /dev/null and b/References/SparkfunDems.pdf differ diff --git a/References/esp32-thing-schematic.pdf b/References/esp32-thing-schematic.pdf new file mode 100644 index 0000000..274ac10 Binary files /dev/null and b/References/esp32-thing-schematic.pdf differ diff --git a/References/esp32-thing-v10.zip b/References/esp32-thing-v10.zip new file mode 100644 index 0000000..e559b2c Binary files /dev/null and b/References/esp32-thing-v10.zip differ