Control over ethernet interface
choose the device to control and hit send
Please choose a model to be sent!
'; //alert } else{ $shape = $_REQUEST['cube']; //$shape = '01111'; $content = '   sent data for model :'; } ?>
    OUTPUT:
'; $shape = base_convert($shape, 10, 2) ; //$b = (binary)($shape<<4); echo '

'; echo "Binary data: ".$shape; //$shape = base_convert($shape, 2, 10) ; // echo base_convert($b, 10, 2) ; //echo '
'; // $b = (binary)($b>>4); //echo '
'.$shape; //invoke serial class and send data include('php_serial.class.php'); $serial = new phpSerial; $serial->deviceSet("/dev/ttyUSB0"); $serial->confBaudRate(9600); $serial->confParity("none"); $serial->confCharacterLength(8); $serial->confStopBits(1); $serial->confFlowControl("none"); $serial->deviceOpen("r+"); $serial->sendMessage($shape); //$message = $serial->readPort(); //print $message; $serial->deviceClose(); ?>