LCD screen test for Stage 1 Engineering at the University of York

Dependencies:   TextLCD UoY-serial

Files at this revision

API Documentation at this revision

Comitter:
ajp109
Date:
Tue Sep 21 13:02:48 2021 +0000
Parent:
1:acb591685a28
Commit message:
Initial commit (LCD test)

Changed in this revision

TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Tue Sep 21 13:02:48 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/ajp109/code/TextLCD/#61aba48c7e5d
--- a/main.cpp	Thu Feb 04 17:12:01 2021 +0000
+++ b/main.cpp	Tue Sep 21 13:02:48 2021 +0000
@@ -1,14 +1,14 @@
 #include "mbed.h"
+#include "UoY-serial.h"
+#include "TextLCD.h"
 
-DigitalOut green(D2);
-DigitalOut red(D3);
+TextLCD lcd(D8, D9, D10, D11, D12, D13);        // 4bit bus: rs, e, d4-d7
 
 int main()
 {
-    while (true) {
-        green = true;
-        thread_sleep_for(500);
-        green = false;
-        thread_sleep_for(2500);
-    }
+    lcd.cls();
+    lcd.printf("Hello...");
+    lcd.locate(7, 1);
+    lcd.printf("...world!");
 }
+