hugh b / Mbed 2 deprecated lpc4088

Dependencies:   mbed

Committer:
hughbellinger
Date:
Sun May 22 18:20:40 2022 +0000
Revision:
1:ae75c5bfd6c6
Parent:
0:679afb0ef65b
intrpt;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hughbellinger 0:679afb0ef65b 1 #include "mbed.h"
hughbellinger 1:ae75c5bfd6c6 2 InterruptIn button(p5);
hughbellinger 1:ae75c5bfd6c6 3 DigitalOut led(LED1);
hughbellinger 1:ae75c5bfd6c6 4 DigitalOut flash(LED2);
hughbellinger 1:ae75c5bfd6c6 5 void flip(){
hughbellinger 1:ae75c5bfd6c6 6 led=1;
hughbellinger 1:ae75c5bfd6c6 7 wait(0.2);
hughbellinger 1:ae75c5bfd6c6 8 led=0;
hughbellinger 1:ae75c5bfd6c6 9 wait(0.2);
hughbellinger 1:ae75c5bfd6c6 10 }
hughbellinger 1:ae75c5bfd6c6 11
hughbellinger 0:679afb0ef65b 12 int main() {
hughbellinger 1:ae75c5bfd6c6 13 button.rise(&flip);
hughbellinger 1:ae75c5bfd6c6 14 while(1) {
hughbellinger 1:ae75c5bfd6c6 15 flash = 1;
hughbellinger 1:ae75c5bfd6c6 16 wait(0.2);
hughbellinger 1:ae75c5bfd6c6 17 led = 0;
hughbellinger 1:ae75c5bfd6c6 18 wait(0.2);
hughbellinger 1:ae75c5bfd6c6 19 }
hughbellinger 0:679afb0ef65b 20 }
hughbellinger 1:ae75c5bfd6c6 21