Transmitting data to I2C
int i2c_write(int $i2c_id, int/string $wbuf[, int $wlen = MAX_STRING_LEN])
data length (byte) on success, 0 on fail
<?php
include "/lib/sd_340.php";
$wbuf = "\x05\x03";
i2c_setup(0, 0x1e); // configuring I2C
$slen = i2c_write(0, $wbuf, 2); // transmitting data to the I2C
if($slen == 2)
echo "$slen bytes have been sent\r\n";
?>