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

Serial Programming with python

hi, i'm very new to python. i downloaded pyserial on win7 64bit. using Dell N5010 (it doesn't really have serial port) i tried to open port with ser = serial.Serial(0) but it gave error that [Error 2] The system cannot find the file specified. but with ser = serial.Serial(3) and upto 5 system waits for sometime and times out.why??
on ser = serial.Serial(5) and ser = serial.Serial(6) it again comes to input as command executed successfully. what i miss? how come system can open COM port 6,7 if it doesn't have any serial port???:-O

Saqib_J
Newbie Poster
5 posts since Oct 2010
Reputation Points: 10
Solved Threads: 1
 

Try serial.Serial("COM3") or the port you need.

Tech B
Posting Whiz in Training
268 posts since May 2009
Reputation Points: 59
Solved Threads: 33
 
Try serial.Serial("COM3") or the port you need.


ok i got it all done. now i can send data to my 8051 microcontroller using ser.write(25) but it sends junk. i also tried ser.write('A'.encode('ascii')) but again its junk that 8051 receive. my controller works fine with hyper terminal means no problem at 8051's end. any idea of junk???:(

Saqib_J
Newbie Poster
5 posts since Oct 2010
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

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