Dependencies:   C12832

Files at this revision

API Documentation at this revision

Comitter:
namcheol
Date:
Mon May 11 13:04:03 2020 +0000
Parent:
0:f31836d48420
Commit message:
lab05-app-shield-lcd

Changed in this revision

C12832.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/C12832.lib	Mon May 11 13:04:03 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/chris/code/C12832/#7de323fa46fe
--- a/main.cpp	Sun Mar 29 19:41:28 2020 +0000
+++ b/main.cpp	Mon May 11 13:04:03 2020 +0000
@@ -1,18 +1,17 @@
 #include "mbed.h"
+#include "C12832.h"
 
-// https://os.mbed.com/docs/mbed-os/v5.15/tools/creating-a-new-program.html
-
-Serial pc(USBTX, USBRX, 115200);    // baud rate 115200
-DigitalOut led(LED1);               // led = LED1
+C12832 lcd(D11, D13, D12, D7, D10); //lcd = (MOSI, SCK, RESET, A0, nCS)
 
 int main()
 {
-    while (true) {
-        led = 0;
-        printf("LED1 is ON\r\n");
-        thread_sleep_for(500);
-        led = 1;
-        printf("LED1 is OFF\r\n");
-        thread_sleep_for(500);
-    }
+    int count = 0;
+    lcd.cls();  //clear screen 
+    lcd.locate(0, 6);
+    lcd.printf("Mbed Application Shield!");
+    while(true){
+        lcd.locate(0, 16);
+        lcd.printf("Counting: %d", count++);
+        thread_sleep_for(1000);
+        }
 }
\ No newline at end of file