0

Actually, I would try to read weight machine data through PHP webpage(website). I think its read through serial port. but I have try many of option to read serial port data but it doesn't work. I have see weight machine data through hyperterminal. please help me.

require './php_serial.class.php';   
$serial = new phpSerial;    
$serial->deviceSet("COM1");    
$serial->confBaudRate(2400);    
$serial->confParity("none");    
$serial->confCharacterLength(8);    
$serial->confStopBits(1);    
$serial->confFlowControl("none");    
$serial->deviceOpen();    
$read = $serial->readPort();    
$serial->deviceClose();    
$serial->confBaudRate(2400);    
Haroldo Gondim
  • 7,725
  • 9
  • 43
  • 62
  • 4
    How can we help you? What means "it doesn't work"? Please provide more info - did you get any errors? – AnTrakS Aug 24 '18 at 13:31
  • You appear to be reading the data but never displaying it or doing anything with it. How do you know it isn't working? What, if anything, do you see/get if you `echo $read;`? – Dave Aug 24 '18 at 14:33

0 Answers0