Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Thomas Weinert:
Building A Sensor Phalanx With PHP
Nov 18, 2013 @ 15:15:12

Thomas Weinert continues his series looking at merging the physical and virtual using PHP to with messages coming from servers and how to build it into a sensor phalanx.

Sensors are fun. They report from the physical world into the digital. But getting the signal into php is only the first part, you will have to get them out again. This post shows how to get data from analog sensors pushed to the browser. It uses Carica Chip, if you haven't read my previous blog post you should do it first.

He talks about the use of ReactPHP in the Carica library and the addition of Ratchet to help with the websocket messaging. He sets up two simple servers - one HTTP, the other websocket - to handle the reporting and interaction with the sensor. He includes the code for the HTTP server and uses his example code to make the phalanx listening on 8081. Some other code is included to make the listeners and the simple UI for the charts. A video is included showing it all in action, reacting to a moving light.

tagged: sensor phalanx tutorial carica chip library reactphp ratchet

Link: http://www.a-basketful-of-papayas.net/2013/11/building-sensor-phalanx-with-php.html

Thomas Weinert:
Carica Chip 101 - Controlling An LED With PHP
Nov 05, 2013 @ 16:18:40

Every once and a while someone uses PHP for something interesting and different than the usual web application. In this post to his site Thomas Weinert shares an example - he uses PHP to control a LED via Carica Chip.

Some time ago, in this blog post, I explained the basic stuff about Arduino, Firmata and PHP. Now it is time for the next step. Carica Io and Carica Firmata have grown and got a third layer called Carica Chip. [...] Carica Chip provides an easy way to control a device. So let's start with an "Interactive LED" example.

He uses the Carica Chip library and the "skeleton" application command from Composer to make a basic application. A simple HTML page with on and off links is made and and basic Carica Chip server is set up and executed. It's a simple example, but it gives you an idea of how to set it all up. The Carica Chip package also allows for other interactions including working with servos and motors.

tagged: carica chip introduction led arduino tutorial package control

Link: http://www.a-basketful-of-papayas.net/2013/11/carica-chip-101-controlling-led-with-php.html


Trending Topics: