![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
sdfgsdfgsdfsdfgsdfgsdfg
Revision 0:c09709a8f2f0, committed 2017-02-01
- Comitter:
- chifterben94
- Date:
- Wed Feb 01 11:00:41 2017 +0000
- Commit message:
- qdfgqsdfgqsdfgsqdfgsdfgsdfgsdfgsdfgsdfg
Changed in this revision
diff -r 000000000000 -r c09709a8f2f0 C12832.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C12832.lib Wed Feb 01 11:00:41 2017 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/chris/code/C12832/#7de323fa46fe
diff -r 000000000000 -r c09709a8f2f0 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Feb 01 11:00:41 2017 +0000 @@ -0,0 +1,56 @@ +#include "mbed.h" +#include "C12832.h" + +Serial pc (USBTX,USBRX,9600); +BusIn joy(D4,A4,A5,A3,A2); +DigitalOut green(PC_7); +AnalogIn Pot1 (A0); +C12832 ecran (D11,D13,D12,D7,D10); +Ticker ticker; + +char caractere = 0; +int etat = 1; + +void allumerEteindre() +{ + green.write(etat); +} + +int main() { + + ticker.attach(&allumerEteindre,0.25); + + + while(1) { + + caractere = (char) (0x5f - 0x20) * Pot1.read() + 0x20; + ecran.cls(); + ecran.locate(0,0); + ecran.printf("%c",caractere); + + switch (joy) + { + case 0x08 : // en bas + + etat = 1; + + break; + + case 0x10 : //en haut + + if(pc.writeable()) + { + + pc.putc(caractere); + etat = 0; + while (joy == 0x10){} + + } + + break; + } + + wait(0.1); + + } +}
diff -r 000000000000 -r c09709a8f2f0 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Feb 01 11:00:41 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/ad3be0349dc5 \ No newline at end of file