PHP Socket Server – Running as Daemon and Multiple Connections

Code Courtesy: lars at opdenkamp dot eu A socket server written in PHP. This can accept multiple connections and runs as a daemon. pcntl_fork() is thing here that is making this all possible. <?php /** * Listens for requests and forks on each connection */ $__server_listening = true; //error_reporting(E_ALL); set_time_limit(0); ob_implicit_flush(); declare(ticks = 1); become_daemon();… Continue reading PHP Socket Server – Running as Daemon and Multiple Connections

BMP-180 Digital Barometric Pressure Sensor

BMP-180 is a compact and cheap Digital Barometric Pressure Sensor. Below is an image of the breakout board commonly available on ebay There is some confusing information about the required voltage, so safest would be to go with 3.3v. As per datasheet (download here) from Bosch, the chip manufacturer, the max voltage is 3.6v It… Continue reading BMP-180 Digital Barometric Pressure Sensor

Realtime Charts / Graphs

CanvasJS  provides a very developer friendly chat or graph library. The library is based on HTML 5 and JS. And can also be used for displaying realtime charts or graphs also. There are various types of charts/graphs available. Below are some useful codes Frontend code: <?php $conn = mysql_connect(“localhost”,”xxxxxxxxx”,”xxxxxxxxx”); if(!$conn) {     echo “Error: failed… Continue reading Realtime Charts / Graphs

Published
Categorised as PHP

ESP8266 ESP-01 – Part 2 – Useful AT Commands And Their Outputs

Below are some AT commands for ESP8266 and their outputs AT OK AT+GMR This will display firmware version and some other details AT+CIPMUX=1 OK AT+CWMODE=3 OK AT+CWJAP=”WIRELESS-ROUTER”,”password” [WIFI DISCONNECTED] (if it is already connected) WIFI CONNECTED WIFI GOT IP OK AT+CIPSTART=4,”TCP”,”x.x.x.x”,80 4,CONNECT OK AT+CIPSEND=4,205 OK > [at this point HTTP request will be made, read… Continue reading ESP8266 ESP-01 – Part 2 – Useful AT Commands And Their Outputs

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