PHP Library for Receiving from/Transmitting to the USB IR Toy v2 Ready!
I am a fan of PHP. I am lazy, and I don’t really want to learn Python. Since the IR Toy is a critical component for my next Raspberry Pi project, (of which the code would be primarily written in PHP), I needed a PHP library to interface with the IR Toy.
I found a good, simple to use Python library to interface with the IR Toy by Chris LeBlanc called PyIrToy. I decided to port it to PHP. Thanks, Chris!
My library is unoriginally called “phpIRToy”.
I have open sourced my code under GPL v3. You can grab it from my bitbucket site (mercurial) at https://bitbucket.org/cdrum/phpirtoy/. Right now it’s on version 1.0 (why not?)
In the repository, other than the License and Readme files, you’ll see 2 main files. In the “lib” folder, the library itself sits. In the “test” folder, I have an example on how to receive a button press from an IR device, and then right away send (transmit) that same button click.
Enjoy! And let me know what you think!