Professional Documents
Culture Documents
h"
//PWM1.pulsewidth(5); //set PWM pulse width to 5 ms PWM1=0.5; //set duty cycle to 50%
} }
void ISR1(){//this is the response to the interrupt, i.e. the ISR led = !led;
int main() {
button.rise(&ISR1); // attach the address of ISR function to the interrupt rising edge while(1) {// continuous loop ready to be interrupted flash=!flash; wait(1); } }