V4

Dependencies:   BMP280

Fork of Thread_Communication_V3 by BDG

Revision:
0:cb3a5c15b01e
Child:
14:7c4d87dfc388
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LCD.h	Tue Dec 12 17:05:59 2017 +0000
@@ -0,0 +1,33 @@
+#ifndef MBED_LCD_H
+#define MBED_LCD_H
+
+
+#define CMD          0
+#define TXT          1
+#define CLEAR        1
+#define HOME         2
+#define READ         1
+#define WRITE        0
+#define LEFT         0
+#define RIGHT        1
+
+#define LINE1    0x80        // Start address of first line
+#define LINE2    0xC0        // Start address of second line
+
+#define LCD_CLR             (LCD_DATA(CLEAR,CMD))
+#define LCD_HOME            (LCD_DATA(HOME,CMD))
+
+class LCD{
+public:
+LCD(PinName RS, PinName E, PinName d4, PinName d5, PinName d6, PinName d7);
+void Clear(void);
+void Write(char text[16]);
+void RowSelect(int row);
+
+protected:
+    void Busy(void);
+    void DATA(char data,char type);
+    DigitalOut _RS, _E;
+    BusOut _DBUS;
+};
+#endif
\ No newline at end of file