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: mbed
Diff: main.cpp
- Revision:
- 0:7b3cd0e11b6e
- Child:
- 1:8fc51018d66d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Mar 13 03:34:07 2015 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+
+PortIn myIOs(PortC, 0xE000); // PC_15 + PC_14 + PC_13
+
+DigitalOut myled(LED1);
+
+int main() {
+ myIOs.mode(PullNone); // PullDown PullUp PullNone OpenDrain
+ while(1) {
+ if (myIOs.read() != 0xE000 && myIOs != 0xE000) { // Any of the 3 IOs is low, two posibility to read value
+ myled = !myled; // Toggle LED state
+ wait(0.2);
+ }
+ }
+}
+
\ No newline at end of file