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.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 1:5f90620e922b
- Parent:
- 0:b59c9d039037
--- a/main.cpp Tue Oct 06 06:01:37 2015 +0000
+++ b/main.cpp Wed Oct 07 11:35:49 2015 +0000
@@ -1,12 +1,15 @@
-#include "mbed.h"
+#include "mbed.h" // Basic Library required for onchip peripherals
-DigitalOut myled(LED1);
+/* Create Objects */
+DigitalOut myled(LED1); // Create a Digital Out object for output
+ // named myled referring to LED1
+/* Main Program */
int main() {
while(1) {
- myled = 1;
- wait(0.5); // 500 ms
- myled = 0;
- wait(0.5);
+ myled = 1; // Led On
+ wait(0.5); // 500 ms delay
+ myled = 0; // Led Off
+ wait(0.5); // 500 ms delay
}
}