This program send an AT command to the HC05 module and shows the response into a terminal.

Dependencies:   mbed-src MODSERIAL

Notebook page HERE

Revision:
3:2f5485de3328
Parent:
2:08505f23f37a
Child:
5:73ac83c240ec
--- a/main.cpp	Fri Oct 18 21:31:21 2013 +0000
+++ b/main.cpp	Sat Oct 19 12:02:30 2013 +0000
@@ -76,6 +76,7 @@
                 i++;
             }
             commandAT(ATCmd);
+            memset(ATCmd, 0, sizeof(ATCmd));
             new_send = false;
         }else
         if(new_response)
@@ -86,7 +87,8 @@
                 blueChar[i] = blue.getc();
                 i++;
             }
-            printf("Response: %s", blueChar);  
+            printf("Response: %s", blueChar); 
+            memset(blueChar, 0, sizeof(blueChar)); 
             new_response = false;   
         }    
         wait_ms(100);