Typograf 5 1 2 Serial Port
HW VSP is a software driver that adds a virtual serial port (e.g. COM5) to the operating system and redirects the data from this port via a TCP/IP network to another hardware interface, which is specified by its IP address and port number. HW VSP3 support even NT Services and 64 bit Windows 8. 5.2 Commercial license.
From A. & M. Neuber Software:What do you need to know about free software?
I'm having trouble to read more than one character using my program, I can't seem to figure out what went wrong with my program.
here are the results I get
actually I was expecting this
something like the above mentioned which is able read multiple characters at the same time not one by one.


4 Answers
I see a couple of issues.
First:
ser.read() is only going to return 1 byte at a time.
If you specify a count
Typograf 5 1 2 Serial Ports
it will read 5 bytes (less if timeout occurrs before 5 bytes arrive.)
If you know that your input is always properly terminated with EOL characters, better way is to use

That will continue to read characters until an EOL is received.
Second:
Even if you get ser.read() or ser.readline() to return multiple bytes,since you are iterating over the return value, you willstill be handling it one byte at a time.
Get rid of the
and just say:
Serial sends data 8 bits at a time, that translates to 1 byte and 1 byte means 1 character.
You need to implement your own method that can read characters into a buffer until some sentinel is reached. The convention is to send a message like 12431n
indicating one line.
So what you need to do is to implement a buffer that will store X number of characters and as soon as you reach that n
, perform your operation on the line and proceed to read the next line into the buffer.
Note you will have to take care of buffer overflow cases i.e. when a line is received that is longer than your buffer etc...
EDIT
I use this small method to read Arduino serial monitor with Python
I was reciving some date from my arduino uno (0-1023 numbers).Using code from 1337holiday, jwygralak67 and some tips from other sources: