IoT based security system that detects suspicious movements through a motion detector and alerts the user on their gmail. In the presence of motion sensed between 7 to 9 times, the Grove PIR sensor sends an input to the board which is connected to internet via Ethernet. The board publishes the sensor data on IBM IoT foundation, which is known as IBM Watson. The data is then sent to IBM Bluemix which provides real time analysis and the remote time data management and monitoring. For more information : https://developer.ibm.com/recipes/tutorials/mbed-c-client-library-for-ibm-iot-foundation/

Dependencies:   C12832 EthernetInterface LM75B MMA7660 MQTT mbed-rtos mbed

Fork of IBMIoTClientEthernetExample by IBM Watson IoT

Revision:
4:77fd4b6ceecb
Parent:
3:69ef39823eef
Child:
5:11fd21af0c0f
--- a/main.cpp	Fri Jul 18 09:33:01 2014 +0000
+++ b/main.cpp	Tue Jul 22 09:19:54 2014 +0000
@@ -59,10 +59,9 @@
 //#define AUTHTOKEN "<auth-token>";
 
 C12832 lcd(D11, D13, D12, D7, D10);
-PwmOut r (D5);
-PwmOut g (D8);
-PwmOut b (D9);
-DigitalOut led2(LED2);
+BusOut r (D5);
+BusOut g (D9);
+BusOut led2 (LED_BLUE);
 MMA7660 MMA(PTE25, PTE24);
 LM75B sensor(PTE25, PTE24);
 DigitalIn Up(A2);
@@ -208,7 +207,10 @@
     //RGB: yellow
     r = 0;
     g = 0;
-    b = 1;
+    
+    #ifdef TARGET_K64F
+        led2 = 1;
+    #endif
     
     lcd.cls();
     lcd.set_font((unsigned char*) Arial12x12);
@@ -280,10 +282,14 @@
         }
         
         if (interval == 0) {
-            //led2 = 0;   
+            #ifdef TARGET_K64F
+                led2 = 1;
+            #else
+                led2 = 0;
+            #endif
         } else {
             if (i%(interval)==0) {
-                //led2 = !led2;
+                led2 = !led2;
             }
         }
         
@@ -300,7 +306,6 @@
     //RGB: yellow
     r = 0;
     g = 0;
-    b = 1;
     
     lcd.cls();
     lcd.locate(0,0);
@@ -372,7 +377,6 @@
         //RGB: green
         r = 1;
         g = 0;
-        b = 1;
         
         lcd.locate(0,0);        
         lcd.printf("IBM IoT Cloud");