#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 10, 11, 12, 13);
#if defined(ARDUINO) && ARDUINO >= 100
#define printByte(args) write(args);
#else
#define printByte(args) print(args,BYTE);
#endif
uint8_t _B[8] = {0x19, 0x19, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f};
uint8_t _I[8] = {0x0, 0x04, 0x0a, 0x11, 0x1f, 0x0, 0x0, 0x0};
uint8_t _G[8] = {0x0e, 0x11, 0x09, 0x11, 0x11, 0x11, 0x11, 0x11};
uint8_t _O[8] = {0x0, 0x0, 0x19, 0x19, 0x09, 0x0f, 0x0, 0x0};
uint8_t _M[8] = {0x19, 0x19, 0x09, 0x09, 0x09, 0x0d, 0x1b, 0x19};
uint8_t _Cat[8] = {0x0, 0x0, 0x0a, 0x15, 0x15, 0x0, 0x0, 0x0};
void setup() {
lcd.begin(20, 4);
pinMode(6, INPUT_PULLUP);
lcd.createChar(6, _B);
lcd.createChar(1, _I);
lcd.createChar(2, _Cat);
lcd.createChar(3, _G);
lcd.createChar(4, _O);
lcd.createChar(5, _M);
// lcd.setCursor(2, 0); lcd.print("\x02");
// lcd.setCursor(2, 1); lcd.print("\x01");
// lcd.setCursor(2, 2); lcd.print("\x06\x03\x06\x05");
// lcd.setCursor(4, 3); lcd.print("\x04");
}
void loop() {
lcd.clear();
if (digitalRead(6) == LOW) {
lcd.setCursor(2, 0); lcd.print("\x02");
lcd.setCursor(2, 1); lcd.print("\x01");
lcd.setCursor(2, 2); lcd.print("\x06\x03\x06\x05");
lcd.setCursor(4, 3); lcd.print("\x04");
} else {
lcd.setCursor(2, 2); lcd.print("BIG BOOM");
}
delay(300);
}