Augusto Panecatl
/
GPIO_RGB
GPIO + IRQ code example for FRDM-KL25Z
main.cpp
- Committer:
- APanecatl
- Date:
- 2014-06-04
- Revision:
- 0:9bb80fc4800d
File content as of revision 0:9bb80fc4800d:
#include "mbed.h" //Delay declared in seconds DigitalOut Red(LED1); DigitalOut Green(LED2); DigitalOut Blue(LED3); DigitalIn enable(PTB11, PullUp); int main() { while(1) { if(enable) { Red = 0; wait(.2); Red = 1; wait(1); Green=0; wait(.2); Green=1; wait(1); Blue=0; wait(.2); Blue=1; wait(1); } } }