Blinky program for SDP-K1.

Files at this revision

API Documentation at this revision

Comitter:
malavikasaji
Date:
Fri Mar 22 20:33:28 2019 +0000
Child:
1:3d0efe79e629
Commit message:
SDP-K1 blinky program.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Mar 22 20:33:28 2019 +0000
@@ -0,0 +1,23 @@
+/* mbed Microcontroller Library
+ * Copyright (c) 2018 ARM Limited
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+#include "mbed.h"
+
+Serial pc(USBTX, USBRX); // tx, rx
+DigitalOut awakeSignal(LED4);
+DigitalOut led1(LED1);
+
+#define SLEEP_TIME                  500 // (msec)
+
+int main()
+{
+    awakeSignal = 1;
+    pc.printf("Hello World!");
+    while (true) {
+        led1 = !led1;
+        wait_ms(SLEEP_TIME); 
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Fri Mar 22 20:33:28 2019 +0000
@@ -0,0 +1,1 @@
+https://github.com/malavikasajikumar/mbed-os/#e9a32f41c034e004767b838fce793f8d01b20e52