test

Dependencies:   BSP_DISCO_F746NG

Files at this revision

API Documentation at this revision

Comitter:
darkseb
Date:
Wed Jun 24 14:00:20 2020 +0000
Commit message:
Code_HCO5_projet_gestion_de_commande_en_ligne_V2

Changed in this revision

.hgignore Show annotated file Show diff for this revision Revisions of this file
BSP_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-os.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 452fd39aec61 .hgignore
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Wed Jun 24 14:00:20 2020 +0000
@@ -0,0 +1,2 @@
+BUILD
+mbed-os/
diff -r 000000000000 -r 452fd39aec61 BSP_DISCO_F746NG.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BSP_DISCO_F746NG.lib	Wed Jun 24 14:00:20 2020 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/teams/ST/code/BSP_DISCO_F746NG/#85dbcff443aa
diff -r 000000000000 -r 452fd39aec61 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jun 24 14:00:20 2020 +0000
@@ -0,0 +1,63 @@
+##include "mbed.h"
+#include "stm32746g_discovery_lcd.h"
+
+Serial pc(USBTX, USBRX);
+Serial bt(PC_6, PC_7);
+
+int main(void)
+{
+    char ch;
+    pc.baud(38400);
+    bt.baud(38400);
+    
+    pc.printf("Test1\n\r");
+
+    /*//Reset complet du HC-05 : Slave mode, pin code :1234, device name: H-C-2010-06-01 ,Baud 38400bits/s.
+    bt.printf("AT+ORGL\r\n");
+    bt.printf("AT+RESET\r\n");*/
+    
+    //Sert à trouver certaines informations 
+    /*bt.printf("AT+INIT\r\n");
+    bt.printf("AT+CMODE=1\r\n");
+    bt.printf("AT+ROLE=1\r\n");*/
+    //bt.printf("AT+ROLE?\r\n");   
+    //bt.printf("AT+IAC?\r\n");
+    //bt.printf("AT+INQM?\r\n");
+    //bt.printf("AT+INQ\r\n");
+    //bt.printf("AT+INQC\r\n");
+    
+    //Teléphone
+    /*bt.printf("AT+INIT\r\n");
+    bt.printf("AT+CMODE=1\r\n");
+    bt.printf("AT+ROLE=1\r\n");
+    bt.printf("AT+PAIR=C462,EA,691DFF,9\r\n");
+    bt.printf("AT+BIND=C462,EA,691DFF\r\n");
+    bt.printf("AT+CMODE=1\r\n");
+    bt.printf("AT+LINK=C462,EA,691DFF\r\n");*/
+    
+    //Scanner
+    bt.printf("AT+INIT\r\n");
+    bt.printf("AT+CMODE=1\r\n");
+    bt.printf("AT+ROLE=1\r\n");
+    bt.printf("AT+PAIR=1C,97,143502,600\r\n");
+    bt.printf("AT+BIND=1C,97,143502\r\n");
+    bt.printf("AT+CMODE=1\r\n");
+    bt.printf("AT+LINK=1C,97,143502\r\n");
+    
+    while(1)
+    {
+        if(bt.readable())
+        {
+            ch=bt.getc();
+            pc.printf("%c",ch);
+            //bt.printf("%c",ch);
+        }
+        
+        /*else if(pc.readable())
+        {
+            ch=pc.getc();
+            //bt.printf("%c",ch);
+            //pc.printf("%c",ch); 
+        }*/
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 452fd39aec61 mbed-os.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Wed Jun 24 14:00:20 2020 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#699372421a3b388fe568e9be85b1a985749a438f