📜  udg: dev ttyUSB0 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:55.661000             🧑  作者: Mango

代码示例1
$stream = stream_socket_client("udg:///dev/ttyUSB0", $errno, $errstr, 30);
fwrite($stream, "enable");

while(true){
    $line = stream_get_contents( $stream );
    if($line == 'exit'){
        break;
    }
}