hugh b / Mbed 2 deprecated lm35i

Dependencies:   mbed

Committer:
hughbellinger
Date:
Sun May 22 20:10:52 2022 +0000
Revision:
0:d3ea274bc4c5
1

Who changed what in which revision?

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