Welcome to phpIRToy


This is a PHP library to interface with the USB IR Toy v2

The USB IR Toy is produced by Dangerous Prototypes. Information about the product can be found at the following URL:

This library started out as a clone/porting of the Python library by the name of pyIrToy by Chris LeBlanc, (This is based on version 0.2.2 of his library)

This library relies on the "Direct IO" PHP Extension (

To install the Direct IO Extension (on a Debian/Raspberry Pi system)... sudo apt-get install php-pear php5-dev sudo pecl install dio channel:// add "" to php.ini (i.e. /etc/php5/cli/php.ini)

Unless you want to run your programs/scripts as root, you need to add the user you're running them as to the unix group "dialout" so your programs will have access to the device.

add user to group dialout crw-rw---T 1 root dialout 166, 0 Feb 12 19:47 /dev/ttyACM0