Andrew Bell
/
lab2_button
nearly working
main.cpp
- Committer:
- andrewbw01
- Date:
- 2021-02-07
- Revision:
- 0:4592a95188f3
- Child:
- 1:093493ce0f37
File content as of revision 0:4592a95188f3:
#include "mbed.h" BusOut LED_Disp(p7,p11,p9,p8,p5,p6,p10,p12); InterruptIn plusbutton(p14); InterruptIn minusbutton(p15); DigitalOut led1(LED1); DigitalOut flash(LED3); void flip() { led1 = !led1; } int main() { plusbutton.rise(&flip); while(1) { flash = !flash; wait(0.25); } }