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
main.cpp
- Committer:
- dousape2
- Date:
- 2015-03-13
- Revision:
- 0:7b3cd0e11b6e
- Child:
- 1:8fc51018d66d
File content as of revision 0:7b3cd0e11b6e:
#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);
}
}
}