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.
main.cpp
00001 #include "mbed.h" 00002 00003 InterruptIn button(D2); 00004 DigitalIn buttoon(D12); 00005 Serial pc (USBTX,USBRX); 00006 00007 int count=0; 00008 void interrupt(){ 00009 int b = buttoon.read(); 00010 if( b==0) 00011 count ++; 00012 else 00013 count --; 00014 pc.printf("%d\n",count); 00015 } 00016 int main() { 00017 button.rise(interrupt); 00018 while(1) { 00019 } 00020 }
Generated on Sat Jul 16 2022 01:24:23 by
1.7.2