a

Dependencies:   mbed

Files at this revision

API Documentation at this revision

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
--- /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) {
+    }
+}
--- /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