Quentin LAM
/
EX9
Exo
Revision 0:5e3f36cc8e4f, committed 2018-05-29
- Comitter:
- Quent1nl
- Date:
- Tue May 29 14:11:03 2018 +0000
- Commit message:
- Ex9;
Changed in this revision
diff -r 000000000000 -r 5e3f36cc8e4f Nboard.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Nboard.h Tue May 29 14:11:03 2018 +0000 @@ -0,0 +1,5 @@ +#include "mbed.h" + +DigitalOut led0(PB_3), led1(PA_7),led2(PA_6),led3(PA_5); +DigitalIn bp(PA_9, PullUp),bou1(PA_10,PullUp),bou2(PB_0,PullUp),bou3(PB_7,PullUp); +BusOut Bus8Leds(PB_3,PA_7,PA_6,PA_5,PA_3,PA_1,PA_0,PA_2);
diff -r 000000000000 -r 5e3f36cc8e4f main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue May 29 14:11:03 2018 +0000 @@ -0,0 +1,16 @@ +#include "Nboard.h" + + +int main() { + while(1) { + + if (bou1 ==0){ + while (bou1==0){} + Bus8Leds = 0x0f; + wait(0.2); + Bus8Leds =0x00; + } + + + } +}
diff -r 000000000000 -r 5e3f36cc8e4f mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue May 29 14:11:03 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/5aab5a7997ee \ No newline at end of file