INSAT_MiniPRoject

Dependencies:   MQTT NDefLib NetworkSocketAPI Servo Light_Sensor_Nucleo X_NUCLEO_IDW01M1v2 mbed

Fork of IDW01M1_Cloud_IBM by ST

Revision:
1:041e9f05738c
Parent:
0:cbf8bc43bc9e
Child:
2:ba0531d896f0
--- a/main.cpp	Fri Apr 08 12:07:17 2016 +0000
+++ b/main.cpp	Tue Apr 12 09:26:56 2016 +0000
@@ -12,8 +12,8 @@
 DigitalOut myled(LED1);
 
 SpwfSAInterface *spwf;
-TCPSocket *tcp_;
-
+TCPSocket *tcp_;    
+    
 int main() {
     int32_t err;    
     char * ssid = "STM";
@@ -26,14 +26,14 @@
   
     spwf = createSPWFInstance();
     tcp_ = new TCPSocket(spwf);
-    
+   
     err = spwf->init();
     if(err!=0)
     {
         pc.printf("\r\n[APP] error initializing.\r\n");
         return -1;
     }
-    
+     
     pc.printf("\r\n[APP] connecting to AP\r\n");
             
     err = spwf->connect(ssid, seckey, NS_SECURITY_WPA);
@@ -79,6 +79,7 @@
     }            
     else 
         pc.printf("\r\n[APP] socket open Error\r\n");
+
                 
     while(1) { 
       wait(1);
@@ -86,4 +87,3 @@
       myled = !myled;
     }
 }
- 
\ No newline at end of file