![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
k
Dependencies: mbed
Revision 0:f32d17a9423d, committed 2015-09-28
- Comitter:
- TFuchsbichler
- Date:
- Mon Sep 28 13:42:05 2015 +0000
- Commit message:
- lk
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 Mon Sep 28 13:42:05 2015 +0000 @@ -0,0 +1,69 @@ +#include "mbed.h" + +BusOut RGB(p23,p24,p25); +BusOut led(LED4,LED3,LED2,LED1); + +void red() +{ + RGB=6; +} + +void green() +{ + RGB=5; +} + +void yellow() +{ + RGB=4; +} + +void black() +{ + RGB=7; +} + + + + +int main() { + for(int i=1;i<=5;i++) + { + yellow(); + led=2; + wait_ms(250); + black(); + led=0; + wait_ms(250); + + + } + + while(1) + { + red(); + led=4; + wait_ms(10000); + yellow(); + led=6; + wait_ms(3000); + green(); + led=1; + wait_ms(8000); + + for(int i=1;i<=2;i++) + { + green(); + led=1; + wait_ms(250); + black(); + led=0; + wait_ms(250); + } + + yellow(); + led=2; + wait_ms(4000); + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Sep 28 13:42:05 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa \ No newline at end of file