File: example/reset.php

Recommend this page to a friend!
  Classes of Andrew Collington  >  iWire PHP Raspberry PI GPIO Class  >  example/reset.php  >  Download  
File: example/reset.php
Role: Example script
Content type: text/plain
Description: Example script
Class: iWire PHP Raspberry PI GPIO Class
Control a Raspberry PI board using GPIO
Author: By
Last change:
Date: 2 years ago
Size: 559 bytes


Class file image Download

 * Phpiwire: A PHP wrapper for wiringPi
 * Example of resetting the GPIO pins
 * @author Andrew Collington,
 * @version 0.2.0
 * @link
 * @license MIT,

namespace Phpiwire;

if (
PHP_SAPI !== 'cli') {
'Sorry, you can only use this via the command line.';

"Raspberry Pi - all pins reset to LOW\n";

$pi = new Board();
foreach (
range(0, 7) as $pin) {
$p = $pi->getPin($pin)->mode(Pin::OUTPUT);

For more information send a message to info at phpclasses dot org.