Button
Page last updated 12 Mar 2012, by .
0
replies
#include "mbed.h"
InterruptIn selector(p16);
DigitalOut s1(p17);
DigitalOut s2(p18);
DigitalOut s3(p19);
DigitalOut s4(p20);
DigitalOut s5(p21);
void select() {
led = !led;
}
int main() {
selector.rise(&select); // attach the address of the "select" function to the rising edge
}
Please log in to post comments.
