Dependencies:   mbed LCD_DISCO_F746NG

Files at this revision

API Documentation at this revision

Comitter:
dagon
Date:
Tue Jun 04 14:48:30 2019 +0000
Commit message:
projet boussole

Changed in this revision

LCD_DISCO_F746NG.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/LCD_DISCO_F746NG.lib	Tue Jun 04 14:48:30 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/dagon/code/LCD_DISCO_F746NG/#0b2764f1ac7b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Jun 04 14:48:30 2019 +0000
@@ -0,0 +1,85 @@
+#include "mbed.h"
+#include "LCD_DISCO_F746NG.h"
+
+Serial pc(USBTX, USBRX); // tx, rx ( pour utiliser Termite )
+Serial carte(D1, D0); // tx, rx ( pour sur le carte )
+LCD_DISCO_F746NG lcd;
+
+
+int main() 
+{  
+
+  //------------------------------------------------------ Test Lieson Serie pour Thermite
+    
+    short capteur[2]={0x00,0x01}; //init de la tram pour le capteur 
+    pc.baud (9600); // definition de la vitesse de transmission
+     
+    while(1) 
+    {
+        pc.printf(" on envoie : %X\n\r",0x19);// envoie demande 0x19 pour avoir les data magnétiques
+    
+        wait (1);
+    
+        for (int i = 0 ; i<2 ; i++) // afficher de la trame      
+        { 
+        pc.printf(" F746 a recu : %d\n\r", capteur[i]);
+        }    
+        wait(1);
+   
+    }
+
+
+   //------------------------------------------------------ Lieson Serie CMPS12/F746G
+    
+  /*  char capteur[2]={0x00,0x01}; //init de la tram pour le capteur
+    char tableau [2]; 
+    //uint8_t str[200] = { 0 };
+    carte.baud (9600); // definition de la vitesse de transmission
+    
+     
+    while(1) 
+    {
+        
+        carte.putc(0x19);// envoie demande 0x19 pour avoir les data magnetiques
+        
+        wait (1);
+        
+        capteur[0]=carte.getc(); //recupération du 1er octet  
+        capteur[1]=carte.getc(); //recupération du 2eme octet  
+        
+        
+         sprintf(tableau,"%c",capteur[0]); // convertion pour affichage 
+        
+         pc.printf("%s",tableau);
+         lcd.DisplayStringAt(0,LINE(0),(uint8_t*)tableau,LEFT_MODE); //affichage
+          
+        wait(1);
+   
+    }*/
+    
+   
+    
+    
+    
+}
+
+  //----------------------------------------------------- interface graphique 
+  
+#include "mbed.h"
+#include "LCD_DISCO_F746NG.h"
+
+ LCD_DISCO_F746NG lcd;
+ int main(void){
+ lcd.SetBackColor(LCD_COLOR_BLACK);
+ lcd.SetTextColor(LCD_COLOR_WHITE);
+ 
+ lcd.DisplayStringAt(0, LINE(0), (uint8_t *)"Boussole", CENTER_MODE);
+  lcd.DisplayStringAt(0, LINE(1), (uint8_t *)"by Antoine Pawlak", CENTER_MODE);
+  lcd.DrawCircle(240,170,100);
+   lcd.DrawLine(240,170,240,120);
+   lcd.DisplayStringAt(0, LINE(2), (uint8_t *)"N", CENTER_MODE);
+   lcd.DisplayStringAt(0, LINE(10), (uint8_t *)"S", CENTER_MODE);
+   lcd.DisplayStringAt(120, LINE(6), (uint8_t *)"E", CENTER_MODE);
+   lcd.DisplayStringAt(-120, LINE(6), (uint8_t *)"W", CENTER_MODE);
+while(1);
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jun 04 14:48:30 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file