Damien Frost / WiflyInterface

Dependents:   IoT_Ex BatteryModelTester BatteryModelTester

Fork of WiflyInterface by Components

Revision:
16:de16e8b077c1
Parent:
15:eaa1ec0e26bf
Child:
18:cf3bd54703a5
Child:
19:df7baf26f955
--- a/Wifly/Wifly.cpp	Sat Feb 20 17:20:28 2016 +0000
+++ b/Wifly/Wifly.cpp	Sat Feb 20 17:43:39 2016 +0000
@@ -68,16 +68,16 @@
 void Wifly::setBaud(int baudrate)
 {
     char cmd[20];
-    // None of these work, although I am not sure where the issue is
     // This sets the baud rate 'instantly'
     sprintf(cmd, "set u i %d\r", baudrate);
     // This one sets it some other way that does not work
     //sprintf(cmd, "set u b %d\r", baudrate);
     // Set baud rate of wifly:
-    sendCommand(cmd, "AOK");
-        
+    sendCommand(cmd, NULL);
+    wait(0.5);
     // Set baud rate of UART:
     wifi.baud(baudrate);
+    wait(0.5);
     exit();
 }