Maps the mbed LEDs to the K22F tricolor LEDs and demonstrates a simple blink sequence. Tested on K22F but may well work on other FRDM boards.
Fork of mbed_blinky by
main.cpp
- Committer:
- apluscw
- Date:
- 2014-11-24
- Revision:
- 7:1941b3600fd1
- Parent:
- 4:81cea7a352b0
File content as of revision 7:1941b3600fd1:
#include "mbed.h" //Map the LED outputs to the tri-color LED DigitalOut redLed(LED1); DigitalOut greenLed(LED2); DigitalOut blueLed(LED3); //Could be logic low or logic high #define LED_ON 0 #define LED_OFF 1 int main() { redLed = LED_OFF; greenLed = LED_OFF; blueLed = LED_OFF; while(1) { redLed = LED_ON; wait(1.0); redLed = LED_OFF; wait(1.0); greenLed = LED_ON; wait(1.0); greenLed = LED_OFF; wait(1.0); blueLed = LED_ON; wait(1.0); blueLed = LED_OFF; wait(1.0); } }