Home automation using Xbee radios

Dependencies:   EthernetNetIf HTTPServer RPCInterface mbed C12832_lcd

Link to Notebook Page

Revision:
4:6091cb494e73
Parent:
3:c4bec8e7cc07
Child:
5:ae3cbcf75d78
--- a/main.cpp	Wed Nov 27 19:15:37 2013 +0000
+++ b/main.cpp	Thu Nov 28 21:40:10 2013 +0000
@@ -86,7 +86,15 @@
            node = node->next;
            }
     }
+    else {
+    printf("There is no node in the list");
+    }
+    if(node !=0){
     node->digitalData = data;
+    }
+    else{
+ printf("Node is not in the list");
+ }
 }
 void analogInputHandle(struct xbee* root,unsigned int addrhigh, unsigned int addrlow, int index, float data){
 struct xbee* node;
@@ -100,6 +108,13 @@
            while(node->addrLow !=addrlow){
            node = node->next;
         }
+    }else {
+    printf("There is no node in the list");
     }
+    if(node !=0){
  node->analogData[index] = data;
+ }
+ else{
+ printf("Node is not in the list");
+ }
 }
\ No newline at end of file