exemple d'utilisation de l'IHM NBOARD (IUT Cachan).

Dependencies:   IHM_NBOARD mbed

Files at this revision

API Documentation at this revision

Comitter:
priou
Date:
Thu Nov 07 17:18:48 2019 +0000
Parent:
19:dd7d692f579c
Commit message:
essai

Changed in this revision

IHM_NBOARD.lib Show annotated file Show diff for this revision Revisions of this file
IHM_V2.lib Show diff for this revision Revisions of this file
Nboard_IHM.cpp Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r dd7d692f579c -r 288312ea7a4c IHM_NBOARD.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IHM_NBOARD.lib	Thu Nov 07 17:18:48 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/teams/IUT-CACHAN-GE1/code/IHM_NBOARD/#ad91067e3f6d
diff -r dd7d692f579c -r 288312ea7a4c IHM_V2.lib
--- a/IHM_V2.lib	Thu May 24 08:03:17 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-https://os.mbed.com/teams/NBoard/code/IHM_V2/#ad91067e3f6d
diff -r dd7d692f579c -r 288312ea7a4c Nboard_IHM.cpp
--- a/Nboard_IHM.cpp	Thu May 24 08:03:17 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-#include "IHM.h"
-IHM ihm;  //clase IHM
-Serial pc(USBTX, USBRX);  // I/O terminal PC 
-int main()
-{
-    UINT8 codeur=0,jog;
-    float pi=4*atan(1.0);
-    ihm.LCD_gotoxy(0,1);
-    pc.printf("Hello IHMV1 \n");
-    ihm.LCD_clear();
-    ihm.LCD_gotoxy(0,0);
-    ihm.LCD_printf("Hello IHM V1");
-    ihm.LCD_gotoxy(1,0);
-    ihm.LCD_printf("PI= %f",pi);  // test affichage float
-    ihm.BAR_set(0x3FF);
-    wait(2);
-    ihm.BAR_set(0x2AA);
-    wait(2);
-    ihm.BAR_set(0x155);
-    wait(2);
-    ihm.LCD_clear();
-    while(1) {
-        wait(0.5);
-        codeur=ihm.COD_read();      
-        jog=ihm.JOG_read();
-        ihm.BAR_set((UINT16)(codeur));
-        ihm.LCD_gotoxy(0,0);
-        ihm.LCD_printf("Jog=%02d",jog);
-        ihm.LCD_gotoxy(1,0);
-        ihm.LCD_printf("Cod=%03d",codeur);
-        pc.printf("Jog=%02d  Cod=%03d \n",jog,codeur); 
-    }
-}
diff -r dd7d692f579c -r 288312ea7a4c main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 07 17:18:48 2019 +0000
@@ -0,0 +1,41 @@
+// Démo de la classe IHM pour utiliser l'IHM de la carte NBOARD de l'IUT Cachan
+
+#include "IHM.h"
+IHM ihm;  // objet de classe IHM pour manipuler l'IHM de la carte NBOARD
+
+Serial pc(USBTX, USBRX);  // I/O terminal PC 
+
+int main()
+{
+    UINT8 codeur=0,jog;
+    float pi=4*atan(1.0);
+    
+    pc.printf("Hello IHM NBOARD (Mai 2018) \n");
+    
+    ihm.LCD_clear();
+    ihm.LCD_gotoxy(0,0);
+    ihm.LCD_printf("Hello IHM NBOARD");
+    ihm.LCD_gotoxy(1,0);
+    ihm.LCD_printf("PI= %f",pi);  // test affichage float
+    
+    ihm.BAR_set(0x3FF);
+    wait(2);
+    ihm.BAR_set(0x2AA);
+    wait(2);
+    ihm.BAR_set(0x155);
+    wait(2);
+    ihm.LCD_clear();
+    
+    while(1) {
+        wait(0.5);
+        codeur = ihm.COD_read();      
+        jog = ihm.JOG_read();
+        ihm.BAR_set((UINT16)(codeur));
+        
+        ihm.LCD_gotoxy(0,0);
+        ihm.LCD_printf("Jog=%02d",jog);
+        ihm.LCD_gotoxy(1,0);
+        ihm.LCD_printf("Cod=%03d",codeur);
+        pc.printf("Jog=%02d  Cod=%03d \n",jog,codeur); 
+    }
+}