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: LinearAnalogSensors mbed
Fork of mbed_selectled by
Diff: main.cpp
- Revision:
- 0:da915495c7fc
- Child:
- 1:6476db5e52e8
diff -r 000000000000 -r da915495c7fc main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue May 31 10:41:47 2016 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+
+Serial pc(USBTX, USBRX);
+DigitalOut myled1(LED1), myled2(LED2);
+
+int main() {
+
+ while(1) {
+ char c = pc.getc();
+ if (c=='q'){
+ myled1 = 1;
+ wait(0.2);
+ myled1 = 0;
+ wait(0.2);
+ }
+
+ if (c=='w'){
+ myled2 = 1;
+ wait(0.2);
+ myled2 = 0;
+ wait(0.2);
+ }
+
+ }
+}
