Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of EX25 by
Revision 0:c09709a8f2f0, committed 2017-02-01
- Comitter:
- chifterben94
- Date:
- Wed Feb 01 11:00:41 2017 +0000
- Child:
- 1:ca389bf1cec5
- Commit message:
- qdfgqsdfgqsdfgsqdfgsdfgsdfgsdfgsdfgsdfg
Changed in this revision
--- /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
--- /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);
+
+ }
+}
--- /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
