pySerial help?

Joined
Jan 13, 2011
Messages
2
Reaction score
0
Hello!

I am having a problem similar to another thread that I replied to (sorry for the double post), I am trying to communicate to a Sanyo projector using pySerial and am having issues as well. I tried the newline that seemed to help the OP, but has not solved my problem. I have verified that my baudrate and parity are all set correctly. Here is my code (using COM13):

import serial
ser = serial.Serial(12)
ser.baudrate = 19200

print ser
print ser.write("CR0\n")
ser.close()


I have also tried variations using "CR0\r", "CR0\r\n", "CR0\x0D" and nothing seems to change it. I'm using another application to ensure that I can speak to the Sanyo projector, and I get a correct response.

CR0 is a status read of the hardware that should return something like "80" which would mean "STANDBY"

However, the responses that I keep getting are things like 3,4, or 5 which seem to be errors, given that they are returned apparently based solely on the length of the String I send, not based on the actual command.

Any ideas?

Thanks so much in advance!

-Damic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top