phpmake / firmata
There is no license information available for the latest version (dev-master) of this package.
dev-master
2014-06-25 20:23 UTC
Requires
- php: >=5.3.0
- ext-gorilla: >=0.5.2
- cboden/ratchet: v0.3.0
- phpmake/logger: v0.1.0
This package is not auto-updated.
Last update: 2024-04-27 12:32:35 UTC
README
PHPMake\Firmata is a PHP interface to communicate with Firmata devices.
See http://firmata.org/ to get more information about Firmata.
Dependencies
PHPMake\Firmata is based on PHPMake\SerialPort extension.
You must install PHPMake\SerialPort before testing PHPMake\Firmata.
The installation is easily. See https://github.com/oasynnoum/phpmake_serialport
Example
Example for Blinking LED
<?php /* initialize the device */ $device = new PHPMake\Firmata\Device('/dev/ttyACM0'); /* for Windows */ // $device = new PHPMake\Firmata\Device('COM3'); $pin13 = 13; for ($i = 0; $i < 3; ++$i) { $device->digitalWrite($pin13, PHPMake\Firmata::HIGH); // light sleep(1); $device->digitalWrite($pin13, PHPMake\Firmata::LOW); // unlight sleep(1); }