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.
Revision 0:a5aeb2522cca, committed 2016-09-21
- Comitter:
- oosattar
- Date:
- Wed Sep 21 10:51:03 2016 +0000
- Commit message:
- 2
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 Wed Sep 21 10:51:03 2016 +0000
@@ -0,0 +1,27 @@
+/****************************************************************
+/ simple program to show basic program structure
+/
+/ the program flashes onboard LED #1 on/off and a rate of 1Hz
+/
+*****************************************************************/
+
+
+
+
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+
+int main() {
+ while(1) { //repeat indefinitly
+ uint8_t x = 0; //set start interger value as 0
+ while(x < 5) { //while "x" interger value is less than 5 run rest of program
+ myled = 1; //turn on LED 1
+ wait(1.0); //wait 1s
+ myled = 0; //turn LED 1 off
+ wait(1.0); //wait 1s
+ x= x + 1; //add 1 to "x" integer value
+ }
+ wait(5.0); //wait 5s
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Sep 21 10:51:03 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/abea610beb85 \ No newline at end of file