INSAT_MiniPRoject

Dependencies:   MQTT NDefLib NetworkSocketAPI Servo Light_Sensor_Nucleo X_NUCLEO_IDW01M1v2 mbed

Fork of IDW01M1_Cloud_IBM by ST

Revision:
3:dfb8c6c8c31b
Parent:
2:ba0531d896f0
Child:
4:1ed7f173eec5
--- a/main.cpp	Wed Apr 13 10:14:35 2016 +0000
+++ b/main.cpp	Thu Apr 14 06:20:36 2016 +0000
@@ -24,7 +24,7 @@
 //------------------------------------
 
 Serial pc(SERIAL_TX, SERIAL_RX);
-
+DigitalOut myled(LED1);
 SpwfSAInterface *spwf;
  
 int main()
@@ -33,6 +33,8 @@
     char * ssid = "STM";
     char * seckey = "STMdemoPWD";
       
+    pc.printf("\r\nSpwf Interface NSAPI Tests\r\n");
+      
     spwf = createSPWFInstance();
     err = spwf->init();
     if(err!=0)
@@ -40,7 +42,7 @@
         pc.printf("\r\nerror initializing.\r\n");
         return -1;
     }
-    
+
     pc.printf("\r\nconnecting to AP\r\n");
             
     err = spwf->connect(ssid, seckey, NS_SECURITY_WPA);
@@ -51,5 +53,10 @@
         nsapi_tests("SPWF Tests", spwf, "192.168.1.5", 32001);
         spwf->disconnect();
     }
-    while(1);
+
+    while(1)
+    {
+        wait(1);
+        myled = !myled;
+    }
 }
\ No newline at end of file