PHP Classes

File: example/ajax-example/_reset.php

Recommend this page to a friend!
  Classes of Andrew Collington   iWire PHP Raspberry PI GPIO Class   example/ajax-example/_reset.php   Download  
File: example/ajax-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: 4 years ago
Size: 493 bytes


Class file image Download

 * Phpiwire: A PHP wrapper for wiringPi
 * Part of the ajax example - resetting pins
 * @author Andrew Collington,
 * @version 0.2.0
 * @link
 * @license MIT,

namespace Phpiwire;

$pins = [0, 0, 0];

$pi = new Board();
foreach (
$pins as $pin => $val) {
$p = $pi->getPin($pin)->mode(Pin::OUTPUT);
$pins[$pin] = $p->read();