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:
- lianghaopo
- Date:
- 2016-03-01
- Revision:
- 0:a11b0f2e51af
- Child:
- 1:f8bee01e9ab4
File content as of revision 0:a11b0f2e51af:
#include "mbed.h"
volatile int count = 0;
DigitalOut myled(PA_5);
//DigitalOut led1(LED0);
Ticker timer1;
void blink_ISR(){
    count++;
}
int main() {
    
    timer1.attach_us(&blink_ISR , 1000);
    
    while(1) {
        if(count == 1000){
            myled = 1;
            wait(0.1);
            myled = 0;
            count = 0;
        }
    }
}