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
Tag: Arduino
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
ESP8266 ESP-01 – Part 1 – Flashing and AT commands
This article is about the one that looks like this (aka ESP-01). Flasher version is 2.3 Firmware version is 1.5 Firmware update might be necessary just after purchase. Without firmware update mine was not able to connect to Wi-fi routers (though they were able to find them) The current firmware available for this is… Continue reading ESP8266 ESP-01 – Part 1 – Flashing and AT commands