954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Problem reading data from serial port (COM3) using pyserial module on Windows XP

Before going into the problem, here is some hardware/software information:

Device accessed: Ohaus Scout Pro Digital Weight Machine ( product link )
Interface used: USB ( product link )
Serial Port: COM3
OS: WinXP
Python Version: Activestate Python 2.7
pyserial version: 2.5

Python recognized this serial port and had no problems opening it. I am new to python as well as pyserial. I couldn't figure out how exactly can I read data from the serial port. I used the following code:

import serial
ser=serial.Serial(port='COM3',timeout=3)
s=ser.read(100) #reading up to 100 bytes
print s


This prints nothing. During those 3 seconds timeout, I placed an object on the weighing machine and it showed 100grams on the weighing machine. But, this data is not showing on my computer. How can I read this data using pyserial?

imperialguy
Newbie Poster
12 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: