Example #1
0
<?php

$success = i2c_open(1);
printf("{$success}\n");
$result = i2c_read_byte(56);
printf("result: {$result}\n");
$result = i2c_write_byte(56, 0);
printf("{$result}\n");
Example #2
0
 /**
  * Read the value from the PCF8574.
  *
  * **WARNING!** This function does not XOR the returned value.
  *
  * @return int The value returned from reading the PCF8574.
  */
 public function direct_read()
 {
     $this->open_bus_if_not_open();
     return i2c_read_byte($this->addr);
 }