port name on my machine is /dev/ttyUSB0
Expand|Select|Wrap|Line Numbers
- $port = "/dev/ttyUSB0";
- open(SERIALPORT,"+>$port") || die("ERROR SENDING DATA\n");
- SERIALPORT->autoflush();
- ## in between I am sending data
- print $FILEHANDLE $data;
after all that process I am closing that file handle.
Expand|Select|Wrap|Line Numbers
- close(SERIALPORT);
but when I am trying to run the script second time then it hands at the step when I am sending data to temperature controller
Expand|Select|Wrap|Line Numbers
- print $FILEHANDLE $data;
I am unable to find out what is the problem.
Can u people figure out what may be the possible reasons for it.
Thanks for your reply in advance.