Code: Select all
require_once("php_serial.class.php");
Code: Select all
$serial = new phpSerial;
In another file, I include global.php that contains my other code to send and read from the class
In a function, I pass the class:
Code: Select all
function checkInput($serial){
Code: Select all
$read = $serial->readPort();
If I do the $read outside of the Function, it doesn't throw the error so I assume I'm doing something wrong passing the class to the function?