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
LCD.h@0:cb3a5c15b01e, 2017-12-12 (annotated)
- Committer:
- benparkes
- Date:
- Tue Dec 12 17:05:59 2017 +0000
- Revision:
- 0:cb3a5c15b01e
- Child:
- 14:7c4d87dfc388
Working No Mail que
Who changed what in which revision?
User | Revision | Line number | New 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 |
benparkes | 0:cb3a5c15b01e | 16 | |
benparkes | 0:cb3a5c15b01e | 17 | #define LCD_CLR (LCD_DATA(CLEAR,CMD)) |
benparkes | 0:cb3a5c15b01e | 18 | #define LCD_HOME (LCD_DATA(HOME,CMD)) |
benparkes | 0:cb3a5c15b01e | 19 | |
benparkes | 0:cb3a5c15b01e | 20 | class LCD{ |
benparkes | 0:cb3a5c15b01e | 21 | public: |
benparkes | 0:cb3a5c15b01e | 22 | LCD(PinName RS, PinName E, PinName d4, PinName d5, PinName d6, PinName d7); |
benparkes | 0:cb3a5c15b01e | 23 | void Clear(void); |
benparkes | 0:cb3a5c15b01e | 24 | void Write(char text[16]); |
benparkes | 0:cb3a5c15b01e | 25 | void RowSelect(int row); |
benparkes | 0:cb3a5c15b01e | 26 | |
benparkes | 0:cb3a5c15b01e | 27 | protected: |
benparkes | 0:cb3a5c15b01e | 28 | void Busy(void); |
benparkes | 0:cb3a5c15b01e | 29 | void DATA(char data,char type); |
benparkes | 0:cb3a5c15b01e | 30 | DigitalOut _RS, _E; |
benparkes | 0:cb3a5c15b01e | 31 | BusOut _DBUS; |
benparkes | 0:cb3a5c15b01e | 32 | }; |
benparkes | 0:cb3a5c15b01e | 33 | #endif |