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
Revision 0:d839aded6393, committed 2016-11-14
- Comitter:
- sivaieee
- Date:
- Mon Nov 14 21:03:07 2016 +0000
- Commit message:
- EXT SWITCH WITH INTERRUPTS A LIL BUGGY
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Nov 14 21:03:07 2016 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" + +DigitalOut myled(LED1); +DigitalOut vrefh(D8); +DigitalIn mySw(D11); +Serial pc(USBTX, USBRX); +InterruptIn event(D11); + +void trigger_rise(){ + pc.printf("rise\n"); + myled = 0; + } +void trigger_fall(){ + pc.printf("fall\n"); + myled=1; + } + +int main() { + vrefh = 0; + event.rise(&trigger_rise); + event.fall(&trigger_fall); + while(1){ + //pc.printf("waiting\n"); + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Nov 14 21:03:07 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/0ab6a29f35bf \ No newline at end of file