hc-05 atmode set

Dependencies:   mbed

Prerequisite

HC-05 Bluetooth ATmode setting


BlueTooth Configuration

Serial Command

/media/uploads/joon874/bluetooth--.png

at
at+name=
at+pswd=
at+reset

Hardware Configuration

WIZwiki-W7500 Pin map

pin map


Software

none

Caution

Revision:
0:55488a36f1c4
Child:
1:0122c3d1e431
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Apr 18 01:20:59 2017 +0000
@@ -0,0 +1,39 @@
+/************
+    AT MODE
+**************/
+/**************
+
+ Module : HC-05
+ 
+***********/
+
+#include "mbed.h"
+
+Serial pc(USBTX, USBRX);
+Serial bt(D1,D0);
+
+int main(void)
+{   
+    pc.baud(9600);  
+    bt.baud(38400);
+    
+    pc.printf("BT AT mode test\n\r");
+    
+    char ch;
+    
+    while(1)
+    {
+        if(pc.readable())
+        {
+            ch = pc.getc();
+            bt.putc(ch);
+        }
+        
+        if(bt.readable())
+        {
+            ch = bt.getc();
+            pc.putc(ch);
+        }    
+        
+    }
+}