Task 5.2.1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
noutram
Date:
Thu Sep 24 12:31:22 2015 +0000
Commit message:
Initial version 24-09-2015

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 62279e997317 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Sep 24 12:31:22 2015 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+
+//Time period
+#define T 0.01
+
+//Mark-Space Ratio
+#define R 0.1
+
+//Mark and Space times
+#define Tmark (R*T)
+#define Tspace ((1.0-R)*T)
+
+DigitalOut onboardLed(LED1);
+DigitalOut redLED(D7);
+
+int main() {
+    printf("\nWelcome to ELEC143\n");
+    
+        while (1) {
+                redLED = 0; //Space
+                wait(Tspace);
+                redLED = 1; //Mark
+                wait(Tmark);
+        }
+}
diff -r 000000000000 -r 62279e997317 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Sep 24 12:31:22 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa
\ No newline at end of file