Nathaniel Garcia
/
blink_button_LCD
modified from original -- NG
Fork of blink_kl46z_button_LCD by
Diff: main.cpp
- Revision:
- 0:e23fffd4b9a7
- Child:
- 1:2688f68df85d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Aug 14 21:18:38 2014 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" +#define LEDON false +#define LEDOFF true + +// slightly more interesting blinky 140814 sc + +float blinks[]={0.200, 0.700}; +int ledState = LEDON; +DigitalOut greenColor(LED_GREEN); +DigitalOut redColor(LED_RED); + +int main() { + while(true) { + ledState = !ledState; // Flip the general state + redColor = ledState; + greenColor = !ledState;// flip state but don't store it. + wait(blinks[ledState]); + } +} \ No newline at end of file