Network, SD card, Serial, LCD and sensors all work! :) ** Don't Press the User Button without an SD Card inserted!! **

Dependencies:   BMP280

Fork of Thread_Communication_V2 by BDG

Committer:
dnonoo
Date:
Sat Jan 06 12:22:12 2018 +0000
Revision:
14:7c4d87dfc388
Parent:
0:cb3a5c15b01e
EVERYTHING WORKING pre object orientated

Who changed what in which revision?

UserRevisionLine numberNew contents of line
benparkes 0:cb3a5c15b01e 1 #ifndef MBED_LCD_H
benparkes 0:cb3a5c15b01e 2 #define MBED_LCD_H
benparkes 0:cb3a5c15b01e 3
benparkes 0:cb3a5c15b01e 4
benparkes 0:cb3a5c15b01e 5 #define CMD 0
benparkes 0:cb3a5c15b01e 6 #define TXT 1
benparkes 0:cb3a5c15b01e 7 #define CLEAR 1
benparkes 0:cb3a5c15b01e 8 #define HOME 2
benparkes 0:cb3a5c15b01e 9 #define READ 1
benparkes 0:cb3a5c15b01e 10 #define WRITE 0
benparkes 0:cb3a5c15b01e 11 #define LEFT 0
benparkes 0:cb3a5c15b01e 12 #define RIGHT 1
benparkes 0:cb3a5c15b01e 13
benparkes 0:cb3a5c15b01e 14 #define LINE1 0x80 // Start address of first line
benparkes 0:cb3a5c15b01e 15 #define LINE2 0xC0 // Start address of second line
dnonoo 14:7c4d87dfc388 16 #define LINE3 0x94
dnonoo 14:7c4d87dfc388 17 #define LINE4 0xD4
benparkes 0:cb3a5c15b01e 18
benparkes 0:cb3a5c15b01e 19 #define LCD_CLR (LCD_DATA(CLEAR,CMD))
benparkes 0:cb3a5c15b01e 20 #define LCD_HOME (LCD_DATA(HOME,CMD))
benparkes 0:cb3a5c15b01e 21
benparkes 0:cb3a5c15b01e 22 class LCD{
benparkes 0:cb3a5c15b01e 23 public:
benparkes 0:cb3a5c15b01e 24 LCD(PinName RS, PinName E, PinName d4, PinName d5, PinName d6, PinName d7);
benparkes 0:cb3a5c15b01e 25 void Clear(void);
dnonoo 14:7c4d87dfc388 26 void Write(char text[80]);
benparkes 0:cb3a5c15b01e 27 void RowSelect(int row);
benparkes 0:cb3a5c15b01e 28
benparkes 0:cb3a5c15b01e 29 protected:
benparkes 0:cb3a5c15b01e 30 void Busy(void);
benparkes 0:cb3a5c15b01e 31 void DATA(char data,char type);
benparkes 0:cb3a5c15b01e 32 DigitalOut _RS, _E;
benparkes 0:cb3a5c15b01e 33 BusOut _DBUS;
benparkes 0:cb3a5c15b01e 34 };
benparkes 0:cb3a5c15b01e 35 #endif