Sending data to the designated UART port
int uart_write(int $uart_id, string $wbuf [, int $wlen = MAX_STRING_LEN])
On success, the number of bytes sent is returned. otherwise: 0
<?php
include "/lib/sd_340.php";
$wbuf = "abcde";
uart_setup(0, 9600); // Configuring UART0 to 9600 bps
$slen = uart_write(0, $wbuf); // Sending $wbuf data to UART0
usleep(500000);
echo "$slen bytes has been sent\r\n";
?>