Talk:Сериен порт
From Ilianko
php
<?php
if(isset($_POST['message']))
{
$fp =fopen("/dev/ttyS0", "w");
if( !$fp) {
echo "Error";die();
}
fwrite($fp, "$_POST[message] \n");
fclose($fp);
}
?>
<html><head></head>
<body>
<form name="serial" action="" method="post">
Message: <input name="message" type="text"><input type="submit" value="Send">
</form>
</body>
</html>