updated for mbed-os 5.5
Fork of Task121 by
Revision 0:c742e33896a9, committed 2015-09-17
- Comitter:
- noutram
- Date:
- Thu Sep 17 16:34:48 2015 +0000
- Child:
- 1:a3b418536134
- Commit message:
- Task 1.2.1
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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Sep 17 16:34:48 2015 +0000
@@ -0,0 +1,26 @@
+//This is known as a “header file”
+//In short, this copies and pastes the text file
+//mbed.h into this code
+#include "mbed.h"
+
+//Create a DigitalOut “object” called myled
+//Pass constant D7 as a “parameter”
+DigitalOut myled(D7);
+
+//The main function - all executable C / C++
+//applications have a main function. This is
+//out entry point in the software
+int main() {
+
+// ALL the code is contained in a
+// “while loop”
+ while(1)
+ {
+ //The code between the { curly braces }
+ //is the code that is repeated
+ myled = 1; // External LED is ON
+ wait(1.0); // 1 second
+ myled = 0; // LED is OFF
+ wait(1.0); // External 1 second
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Sep 17 16:34:48 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/da0ca467f8b5 \ No newline at end of file
