Pages: [1]   Go Down
Author Topic: How to open serial port with Python  (Read 305 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi ,guys

I came across some port problem when I try to use python to do some tests. My serial port is COM5, actually.
When I use processing, I open the serial port by writing:
String portstr = Serial.list()[2]; port = new Serial(this, portstr, 9600);

but what about python? I write the code:SERIAL_PORT = "COM5";
ser = serial.Serial(SERIAL_PORT, 9600, timeout=1);
But unfortunately it does not work, can you give me some advices?

Pages: [1]   Go Up
Jump to: