Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 0:62279e997317
--- /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);
+ }
+}