i2c_scan()


搜索I2C slave

Description

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

Parameters

Return Value

搜索到的slave数

Example

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

See also