• Post Reply Bookmark Topic Watch Topic
  • New Topic

getting data from serial port device  RSS feed

 
Ja King
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am sending a command to a device to retrieve data from that device.After writing a command to the device i will wait for some time(Response time ---> Thread.sleep(100)) to get the response form the device.But some times i will get the data from the device for that particular response time , but most of the times i won't get the data.

If i set the response time Thread.sleep(1000) i will get the data , but it 's not a good programming .

I need good solution to solve the problem.Please help.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!