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:
- 1:077d8e1f21a8
- Parent:
- 0:2c2981e27ad1
--- a/main.cpp Sun Mar 27 17:46:06 2016 +0000
+++ b/main.cpp Sun Mar 27 18:46:39 2016 +0000
@@ -3,10 +3,15 @@
#include "mbed.h"
Serial pc(USBTX, USBRX);
+DigitalOut myled(LED1);
+
int main()
{
- // pc.printf("Could not open file for write\n"); // error if no pointer
- // pc.printf("SD card file successfully opened\n"); // if pointer ok
- pc.printf("Hello World!");
-
+ while (1) { //a continuous loop is created
+ myled = 1; //switch the led on, by setting the output to logic 1
+ wait(0.2); //wait 0.2 seconds
+ myled = 0; //switch the led off
+ wait(0.2); //wait 0.2 seconds
+ }
+
}
\ No newline at end of file