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:f31836d48420
- Child:
- 1:89d23c8072af
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Mar 29 19:41:28 2020 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+
+// https://os.mbed.com/docs/mbed-os/v5.15/tools/creating-a-new-program.html
+
+Serial pc(USBTX, USBRX, 115200); // baud rate 115200
+DigitalOut led(LED1); // led = LED1
+
+int main()
+{
+ while (true) {
+ led = 0;
+ printf("LED1 is ON\r\n");
+ thread_sleep_for(500);
+ led = 1;
+ printf("LED1 is OFF\r\n");
+ thread_sleep_for(500);
+ }
+}
\ No newline at end of file