ikarus / sps-i2c-dac
v0.8.0
2021-03-10 10:44 UTC
Requires
- php: >=7.2
- tasoft/php-i2c-extension: ^0.9
This package is auto-updated.
Last update: 2024-11-10 18:40:08 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.