<?php error_reporting(E_ALL); ini_set('display_errors', '1'); include "PhpSerial.php"; $serial = new PhpSerial; $serial->deviceSet("/dev/ttyUSB0"); $serial->confBaudRate(9600); $serial->confParity("none"); $serial->confCharacterLength(8); $serial->confStopBits(1); $serial->deviceOpen(); $status_req = ("W&"); $serial->sendMessage($status_req); $read = $serial->readPort(30); echo ($read); $ascii_read = array() //foreach($ascii_read as $reply) { print "<p>$reply</p>"; //$serial->deviceClose(); echo "I've sent a message! \n\r";
You have javascript disabled. You will not be able to edit any code.