Quentin LAM
/
ex11
Exo
Revision 0:e674d0c66c6a, committed 2018-05-29
- Comitter:
- Quent1nl
- Date:
- Tue May 29 14:12:43 2018 +0000
- Commit message:
- EX11
Changed in this revision
diff -r 000000000000 -r e674d0c66c6a IHM.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IHM.lib Tue May 29 14:12:43 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/slowness/code/IHM/#a9e51ac904e2
diff -r 000000000000 -r e674d0c66c6a Nboard.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Nboard.h Tue May 29 14:12:43 2018 +0000 @@ -0,0 +1,5 @@ +#include "mbed.h" + +DigitalOut led0(PB_3), led1(PA_7),led2(PA_6),led3(PA_5),led4(PA_3),led5(PA_1),led6(PA_0),led7(PA_2); +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); \ No newline at end of file
diff -r 000000000000 -r e674d0c66c6a main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue May 29 14:12:43 2018 +0000 @@ -0,0 +1,34 @@ +#include "Nboard.h" +#include "IHM.h" +IHM ihm; + + +int main() +{ + UINT16 n =3; + short f =1; + while(1) { + if(bou1==0){ + while(bou1==1); + Bus8Leds=n; + + if(f<8) { + n=n<<1; + wait(0.25); + f++; + } + else if (f>=8) { + wait(0.25); + n=n>>7; + f=1; + } + } + + + + + } + + + +}
diff -r 000000000000 -r e674d0c66c6a mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue May 29 14:12:43 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/5aab5a7997ee \ No newline at end of file