Exo

Dependencies:   IHM_V2 mbed

Revision:
0:423cc5f68c56
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue May 29 14:16:00 2018 +0000
@@ -0,0 +1,34 @@
+#include "Nboard.h"
+
+
+IHM ihm;
+
+int main()
+{
+    UINT16 val,pota,decal;
+    float pot;
+    while(1) {
+        BusSelMux=Ana7;
+        wait_us(1);
+        val=AnaIn.read_u16();
+        pot=AnaIn.read();
+        pota=val;
+        decal=val;
+        pota=pota>>4;
+        ihm.LCD_gotoxy(0,0);
+        ihm.LCD_printf("POT=%04X=%3.2f",val,pot);
+        ihm.LCD_gotoxy(1,0);
+        ihm.LCD_printf("POT=%X=%5d",pota,pota); 
+        decal=decal>>8;
+        //Bus8Leds=decal;
+        if(pot==0.5){
+            Bus8Leds=0x0F;
+            }
+            if(pot>=0.75){
+                Bus8Leds=0x3F;
+                }
+                else{
+                    Bus8Leds=0x00;
+                    }
+    }
+}
\ No newline at end of file