ikarus/sps-i2c-dac

v0.8.0 2021-03-10 10:44 UTC

This package is auto-updated.

Last update: 2024-04-10 17:31:30 UTC


README

This package contains php classes to control dac chips.

Installation

$ composer require ikarus/sps-i2c-dac

Usage

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

$dac = new DAC_MCP4625( new I2C( DAC_MCP4625::DEFAULT_ADDRESS ) );
$dac->setOutput(2048); // Set to half of vdd.
sleep(5);
$dac->setOutput(0, true); // Set to 0 and store this.