A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/WiringPi/WiringPi-PHP below:

WiringPi/WiringPi-PHP: PHP wrapper for WiringPi

An implementation of most of the Arduino Wiring functions for the Raspberry Pi

You will need to clone this repository with the --recursive flag on git clone as it contains WiringPi as a submodule.

You will need to first install php-dev or php5-dev

Then

This will give you a build folder with the wiringpi.so module, this needs to go in the relevant folder of your PHP installation.

Most likely somewhere in /usr/lib/php5/

Alternatively you can:

This will additionally copy wiringpi.php which you can include with:

include(ini_get('extension_dir') . '/wiringpi.php');

To choose the pin mapping type that you wish to use, create an ini file /etc/php5/conf.d/wiringpi.ini and adding the following:

extension=wiringpi.so
wiringpi.pinmaptype=[PINS|GPIO|USER]

To avoid having to change the www-data user to root, you can add it to the relevant groups:

sudo adduser www-data i2c
sudo adduser www-data spi
sudo adduser www-data gpio

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4