Skip to content

Instantly share code, notes, and snippets.

<?php
class GPIO {
// Using BCM pin numbers.
private $pins = ['0', '1', '4', '7', '8', '9', '10', '11', '14', '15', '17', '18', '21', '22', '23', '24', '25'];
// exported pins for when we unexport all
private $exportedPins = array();
// Setup pin, takes pin number and direction (in or out)