Augusto Panecatl
/
GPIO_RGB
GPIO + IRQ code example for FRDM-KL25Z
Revision 0:9bb80fc4800d, committed 2014-06-04
- Comitter:
- APanecatl
- Date:
- Wed Jun 04 19:22:26 2014 +0000
- Commit message:
- Rev 1.0
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jun 04 19:22:26 2014 +0000 @@ -0,0 +1,33 @@ +#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); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jun 04 19:22:26 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/0b3ab51c8877 \ No newline at end of file