A PHP extension to control GPIO on the RaspberryPi – my BrightonPHP talk

A while ago now (back in February!) I did a talk about writing an extension using Zephir to interact with the RaspberryPi’s GPIO.  The extension itself wraps around the wiringPi library and it makes it really easy to write PHP scripts that send output and gather input from the GPIO.

Here are the slides (use left/right arrow keys to navigate):

Full-sized version of the slides

Did you like this? Share it:

phpiwire updated – now with PWM!

I’ve pushed a few changes to phpiwire can now use the PWM functions in wiringPi.  You can use either the hardware PWM pins or any of the GPIOs by using software PWM.  A couple new examples of how to do this have also been added to the repository.

With software PWM comes the requirement to include pthreads, so that’s also linked when you compile the zephir extension.

I’d recommend you do a full clean first before compiling with:

zephir fullclean
zephir install
Did you like this? Share it:

Phpiwire: a PHP extension (written using Zephir) for controlling the Raspberry Pi GPIO

So it’s been a while since my lightening talk on Zephir and I realized I hadn’t really done anything to try to learn it a little more in-depth.  Coincidentally, I was recently going through a drawer and realized that one of my Raspberry Pi’s was in there just begging to be put to some use (seriously, I could practically hear it weep).  So I thought that the only thing to do was to attempt to write an extension using Zephir so that I could control the GPIO via PHP.  I mean, isn’t it obvious? Continue reading “Phpiwire: a PHP extension (written using Zephir) for controlling the Raspberry Pi GPIO”

Did you like this? Share it: