I’m 99% sure most if not all of this code is yours or someone associated with Envirodiy. If you can’t tell, I know very very very little about arduinos. I have a friend that put this together for me and I pointed him to this website for guidance. I’m sure he used the copy and paste method for coding. He didn’t have time to work with the xbee radios, so I took the code and changed things to serial1 to try and get the communication to work. It works, but obviously it isn’t the way things should be done. I have the V0.3 boards. I got them when you first went live with them. They are great boards and fun to play with.
The plan is to take the sonar reading, battery voltage, and date string send it to the base unit then have the base unit send it to the website and MySQL database. I would also like to save the string to an SD card at the base station. This way I have a backup if the network should go down.
You mentioned having a table for each sensor in the database. I could have up to 15 sensor loggers communicating to the base station in 1 to 5 minute intervals for one client. Is it possible to combine the strings from all sensor loggers into one and send it to one table in the database? The sensors will be setup on individual ponds, then the report would look like:
Pond 1, Pond 2, Pond 3, etc.
These could probably be inserted into separate tables in the database then generate a report to combine them by date read.
This is getting way over my head. I appreciate all the help and code examples you are willing to share.