Quentin LAM
/
ex10
Exo
Revision 0:64f23204b33e, committed 2018-05-29
- Comitter:
- Quent1nl
- Date:
- Tue May 29 14:12:20 2018 +0000
- Commit message:
- EX10
Changed in this revision
diff -r 000000000000 -r 64f23204b33e IHM.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IHM.lib Tue May 29 14:12:20 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/slowness/code/IHM/#a9e51ac904e2
diff -r 000000000000 -r 64f23204b33e Nboard.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Nboard.h Tue May 29 14:12:20 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); \ No newline at end of file
diff -r 000000000000 -r 64f23204b33e main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue May 29 14:12:20 2018 +0000 @@ -0,0 +1,26 @@ +#include "Nboard.h" +#include "IHM.h" + +IHM ihm; + +int main() +{ + short cpt1 = 0; + short cpt2 = 0; + while(1) { + if (bou1 == 0) { + while(bou1==0){} + cpt1++; + ihm.LCD_gotoxy(0,0); + ihm.LCD_printf(" CPT1 = %hd",cpt1); + + } + if (bou2 == 0) { + while(bou2==0){} + cpt2++; + ihm.LCD_gotoxy(1,0); + ihm.LCD_printf(" CPT2 = %hd",cpt2); + + } + } +}
diff -r 000000000000 -r 64f23204b33e mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue May 29 14:12:20 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/5aab5a7997ee \ No newline at end of file