Arduino – Communicate With Server – Part 2 – Server Code for Saving Data

This article shows the server side code for a server which is gathering or sending data by polling method to an Arduino device. This method or code is putting less load on the server (compared to socket) but data transmission is slower than socket. <?php date_default_timezone_set(“Asia/Kolkata”); $conn = mysql_connect(“localhost”,”root”,”**********”); if(!$conn) {     echo “Error: failed… Continue reading Arduino – Communicate With Server – Part 2 – Server Code for Saving Data

Arduino – Communicate With Server – Part 1 – Arduino code

The below code send some data (temperature and pressure here) to a server and reads back some data from server. The send part works every 5 minutes and the read part works every 5 seconds. This code works by polling method. All delays might have room for optimization #include <SFE_BMP180.h> //from sparkfun #include <Wire.h> #include… Continue reading Arduino – Communicate With Server – Part 1 – Arduino code