Hari Prasad
/
intrupts
in
main.cpp
- Committer:
- harseed951
- Date:
- 2015-07-02
- Revision:
- 0:e2079fd3f2d9
File content as of revision 0:e2079fd3f2d9:
#include "mbed.h" DigitalOut a(LED1),b(LED2),c(LED3),d(LED4); InterruptIn sw(p5); void down() { a=1;b=1,c=1,d=1; wait(1); a=1;b=1;c=1;d=0; wait(1); a=1;b=1;c=0;d=1; wait(1); a=1;b=1;c=0;d=0; wait(1); a=1;b=0;c=1;d=1; wait(1); a=1;b=0;c=1;d=1; wait(1); a=1;b=0;c=0;d=1; wait(1); a=1;b=0;c=0;d=0; wait(1); a=0;b=1;c=1;d=1; wait(1); a=0;b=1;c=1;d=0; wait(1); a=0;b=1;c=0;d=1; wait(1); a=0;b=1;c=0;d=0; wait(1); a=0;b=0;c=1;d=1; wait(1); a=0;b=0;c=1;d=0; wait(1); a=0;b=0;c=0;d=1; wait(1); a=0;b=0;c=0;d=0; wait(1); } int main() { sw.rise(&down); a=0;b=0;c=0;d=1; wait(1); a=0;b=0;c=1;d=0; wait(1); a=0;b=0;c=1;d=1; wait(1); a=0;b=1;c=0;d=0; wait(1); a=0;b=1;c=0;d=1; wait(1); a=0;b=1;c=1;d=0; wait(1); a=0;b=1;c=1;d=1; wait(1); a=1;b=0;c=0;d=0; wait(1); a=1;b=0;c=0;d=1; wait(1); a=1;b=0;c=1;d=1; wait(1); a=1;b=0;c=1;d=1; wait(1); a=1;b=1;c=0;d=0; wait(1); a=1;b=1;c=0;d=1; wait(1); a=1;b=1;c=1;d=0; wait(1); a=1;b=1;c=1;d=1; wait(1); }