dio_in()


读取指定DI端口的输入值

Description

int dio_in(int $pin)

Parameters

Retern Values

输入端口状态为HIGH时为1, LOW时为0

Example

<?php
include "/lib/sd_204.php";
echo dio_in(DI_0), "\r\n";   // Reading the port 0 of the DI
echo dio_in(DI_1), "\r\n";   // Reading the port 1 of the DI
?>

See also