sdfgsdfgsdfsdfgsdfgsdfg

Dependencies:   C12832 mbed

Files at this revision

API Documentation at this revision

Comitter:
chifterben94
Date:
Wed Feb 01 11:00:41 2017 +0000
Commit message:
qdfgqsdfgqsdfgsqdfgsdfgsdfgsdfgsdfgsdfg

Changed in this revision

C12832.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /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