LCD screen test for Stage 1 Engineering at the University of York
Dependencies: TextLCD UoY-serial
Diff: main.cpp
- Revision:
- 2:fa30a823bed1
- Parent:
- 1:acb591685a28
diff -r acb591685a28 -r fa30a823bed1 main.cpp --- 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!"); } +