From 1ebf39f72a3b2a1e2a4fd5eb9062483ef85ab94c Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Sat, 10 Aug 2019 19:18:20 +0700 Subject: [PATCH] add SiwatINC lcdlibrary --- WaterishOS-core2.0/WaterishOS-core2.0.ino | 2 ++ WaterishOS-core2.0/config.h | 1 + WaterishOS-core2.0/lcdcontrol.h | 6 ++++++ 3 files changed, 9 insertions(+) create mode 100644 WaterishOS-core2.0/lcdcontrol.h diff --git a/WaterishOS-core2.0/WaterishOS-core2.0.ino b/WaterishOS-core2.0/WaterishOS-core2.0.ino index 8b5eeb2..6fd94e4 100644 --- a/WaterishOS-core2.0/WaterishOS-core2.0.ino +++ b/WaterishOS-core2.0/WaterishOS-core2.0.ino @@ -1,3 +1,4 @@ +#include #include #include #include @@ -24,6 +25,7 @@ #include #include #include +#include "lcdcontrol.h" Adafruit_MCP23017 mcp; long tslr=0; WiFiClient espClient; diff --git a/WaterishOS-core2.0/config.h b/WaterishOS-core2.0/config.h index 270f23e..e483c6b 100644 --- a/WaterishOS-core2.0/config.h +++ b/WaterishOS-core2.0/config.h @@ -4,3 +4,4 @@ const byte InteruptPinA=1; const byte InteruptPinB=3; const byte arduinoInterrupt=1; const String nodename="devkit"; +#define LCD_I2C 0x27 diff --git a/WaterishOS-core2.0/lcdcontrol.h b/WaterishOS-core2.0/lcdcontrol.h new file mode 100644 index 0000000..f58cde5 --- /dev/null +++ b/WaterishOS-core2.0/lcdcontrol.h @@ -0,0 +1,6 @@ +class disp { + public: + LiquidCrystal_I2C lcd(LCD_I2C, 16, 2); + int menu(); + +}