i2c_scan()


scanning I2C slaves

Description

int i2c_scan(int $i2c_id[, int $rw_bit = 1[, int $len = 0]])

Parameters

Return Value

the number of slaves which have been found

Example

<?php
include "/lib/sd_340.php";
$num = i2c_scan(0);                 // scanning slaves
echo "$num slave(s) are founded";   // outputting scan result
?>

See also