ikarus/sps-i2c-gpio-extender

v0.8.12 2024-07-03 12:24 UTC

This package is auto-updated.

Last update: 2024-11-03 12:57:12 UTC


README

This package contains php classes to extend your gpio pins.

Installation

$ composer require ikarus/sps-i2c-gpio-extender

Usage

<?php
use Ikarus\SPS\I2C\Extender_8GPIO_PCF_8574;
use TASoft\Bus\I2C;

$extender = new Extender_8GPIO_PCF_8574( new I2C(0x3F) );
$extender->digitalWrite( $extender::PIN_3, $extender::VAL_HIGH );
sleep(1);
$extender->digitalWrite( $extender::PIN_3, $extender::VAL_LOW );
$extender->cleanup();