News Feed
Sections




News Archive
feed this:

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

Thomas Weinert:
Carica Chip 101 - Controlling An LED With PHP
November 05, 2013 @ 10: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.

0 comments voice your opinion now!
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

Thomas Weinert:
Basics Using Arduino From PHP
June 21, 2013 @ 09:33:52

In his latest post Thomas Weinert talks about using an Ardiuno board from inside of PHP (most people seem to use Python instead).

This is the version mostly described on the net. For example on Instructables. Basically you write an Arduino Scetch that listens and send plain text data on the serial port. A PHP Script triggered by a webserver request opens the port communicates with the Arduino board an outputs some HTML. The major downside of this approach is that many Arduino boards reset if the serial port is opened. So the startup and configuration has to be done any time the PHP scripts reads some data or triggers an action.

He talks about the Firmata software and an alternative to trying to call it through PHP - using one of a few non-blocking I/O libraries like React PHP. He's created his own non-blocking library that's made to work more specifically with the Firmata protocol, though. Some code samples are provided showing how to use it to make a light blink ("Hello world" for Arduino) and working with the data from a dimmer.

0 comments voice your opinion now!
arduino library nonblocking caricaio firmata tutorial

Link: http://www.a-basketful-of-papayas.net/2013/06/basics-of-using-arduino-from-php.html


Community Events





Don't see your event here?
Let us know!


experience introduction framework testing series language threedevsandamaybe code install community release opinion podcast interview refactor laravel list unittest wordpress developer

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework