Testing blinky with museduino with KL-46Z

Dependencies:   mbed

Fork of blink_kl46z by Stanley Cohen

Committer:
bomalley
Date:
Wed Mar 11 19:54:53 2015 +0000
Revision:
1:c194fc5d98bd
Parent:
0:e23fffd4b9a7
testing museduino with KL-46Z

Who changed what in which revision?

UserRevisionLine numberNew contents of line
scohennm 0:e23fffd4b9a7 1 #include "mbed.h"
scohennm 0:e23fffd4b9a7 2 #define LEDON false
scohennm 0:e23fffd4b9a7 3 #define LEDOFF true
scohennm 0:e23fffd4b9a7 4
bomalley 1:c194fc5d98bd 5 // blinky using the museduino board
scohennm 0:e23fffd4b9a7 6
bomalley 1:c194fc5d98bd 7 float blinks[]={0.700, 1.000};
bomalley 1:c194fc5d98bd 8 DigitalOut outPin(PTC9);
scohennm 0:e23fffd4b9a7 9 int ledState = LEDON;
bomalley 1:c194fc5d98bd 10 //DigitalOut greenColor(LED_GREEN);
bomalley 1:c194fc5d98bd 11 //DigitalOut redColor(LED_RED);
scohennm 0:e23fffd4b9a7 12
scohennm 0:e23fffd4b9a7 13 int main() {
scohennm 0:e23fffd4b9a7 14 while(true) {
scohennm 0:e23fffd4b9a7 15 ledState = !ledState; // Flip the general state
bomalley 1:c194fc5d98bd 16 //redColor = ledState;
bomalley 1:c194fc5d98bd 17 //greenColor = !ledState;// flip state but don't store it.
bomalley 1:c194fc5d98bd 18 outPin.write(ledState);
scohennm 0:e23fffd4b9a7 19 wait(blinks[ledState]);
scohennm 0:e23fffd4b9a7 20 }
scohennm 0:e23fffd4b9a7 21 }