Начальная страница - relay_button.php -
PHP код:
<?php
include "php_serial.class.php";
$serial = new phpSerial;
$serial->deviceSet("/dev/ttyACM0");
$serial->confBaudRate(9600);
$serial->deviceOpen();
usleep(2000000);
$read = $serial->readPort();
print $read;
$serial->deviceClose();
?>