Ciao a tutti ragazzi sto cercando di far comunicare in seriale php e arduino ho scrtto tutto lo script ma la classe seriale di php mi da questi errori potreste darmi una mano??
Questi sono gli errori invece
Warning: Specified serial port is not valid in /var/www/html/php_serial.class.php on line 145
Warning: Unable to set the baud rate : the device is either not set or opened in /var/www/html/php_serial.class.php on line 238
Warning: Unable to set parity : the device is either not set or opened in /var/www/html/php_serial.class.php on line 292
Warning: Unable to set length of a character : the device is either not set or opened in /var/www/html/php_serial.class.php on line 340
Warning: Unable to set the length of a stop bit : the device is either not set or opened in /var/www/html/php_serial.class.php on line 381
Warning: Unable to set flow control mode : the device is either not set or opened in /var/www/html/php_serial.class.php on line 426
Warning: The device must be set before to be open in /var/www/html/php_serial.class.php on line 171
Grazi mille in anticipo ragazzi :DD
PHP:
<?
phpinclude "php_serial.class.php";
error_reporting(E_ALL);ini_set("display_errors", 1);
$serial = new phpSerial;
$serial -> deviceSet("/dev/ttyACM0");
$serial -> confBaudRate(9600);
$serial -> confParity("none");
$serial -> confCharacterLength(8);
$serial -> confStopBits(1);
$serial -> confFlowControl("none");
$serial -> deviceOpen();
if (isset($_GET['action'])) {
if ($_GET['action'] == "on") {
$serial->sendMessage("h");
} else if ($_GET['action'] == "off") {
$serial->sendMessage("l"); }
$serial->deviceClose();}?>
Questi sono gli errori invece
Warning: Specified serial port is not valid in /var/www/html/php_serial.class.php on line 145
Warning: Unable to set the baud rate : the device is either not set or opened in /var/www/html/php_serial.class.php on line 238
Warning: Unable to set parity : the device is either not set or opened in /var/www/html/php_serial.class.php on line 292
Warning: Unable to set length of a character : the device is either not set or opened in /var/www/html/php_serial.class.php on line 340
Warning: Unable to set the length of a stop bit : the device is either not set or opened in /var/www/html/php_serial.class.php on line 381
Warning: Unable to set flow control mode : the device is either not set or opened in /var/www/html/php_serial.class.php on line 426
Warning: The device must be set before to be open in /var/www/html/php_serial.class.php on line 171
Grazi mille in anticipo ragazzi :DD
Ultima modifica: