In 2010 I saw several projects on using arduino’s to monitor a garden. As an excercise I developed a similar project to monitor and control a greenhouse and send data wirelessly using Xbee to another xbee-equipped arduino, which connected to the internet and put the received data in a database.
That worked fine, until the box which I thought was waterproof, turned out not to be waterproof. Fried electronics and demotivated I threw the project aside.
Now, I want to pick it up again and change and expand it, but I am running into issues with managing my code. For example, for whatever reason I cannot seem to get more than 35 or so characters in an Xbee package between two Xbee (series 2) radio’s. Another is the gateway device that I would like to extend to be able to deal with more nodes and thus more different types of data. For example: a weathernode may send temp, humidity, wind, rain, etc values. The garden node may send soiltemp, airtemp, soil moisture levels, etc while a node in the water tank reports water levels.
The problem with that is that I am not sure how to develop a protocol that can be used by the nodes and expanded later. I started using a string in each xbee message like this key:value,key:value,key:value but considering the 35 character limit of an xbee packet, I cannot send all the readings in one package.
I think I will be able to program a solution (I did manage to build the controller node and gateway node after all), but not sure how to “future proof” my code.
I know this is not a very concrete question, but is there anybody with similar experiences that has already learned some similar lessons and is willing to share?
If you want to have a look at the old code, I put it up on github some time ago: GrOW/GrOW_Gateway.pde at master · sindono/GrOW · GitHub
GrOW/GrOW_Controller.pde at master · sindono/GrOW · GitHub
All help appreciated!