100% akira
/
Nucleo_blink_ledennko-da-
a
Revision 0:f429cba13b88, committed 2018-10-20
- Comitter:
- AK1412
- Date:
- Sat Oct 20 01:26:25 2018 +0000
- Commit message:
- a; ;
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 |
diff -r 000000000000 -r f429cba13b88 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Oct 20 01:26:25 2018 +0000 @@ -0,0 +1,20 @@ +#include "mbed.h" + +InterruptIn button(D2); +DigitalIn buttoon(D12); +Serial pc (USBTX,USBRX); + +int count=0; +void interrupt(){ + int b = buttoon.read(); + if( b==0) + count ++; + else + count --; + pc.printf("%d\n",count); + } +int main() { + button.rise(interrupt); + while(1) { + } +}
diff -r 000000000000 -r f429cba13b88 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Oct 20 01:26:25 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/5aab5a7997ee \ No newline at end of file