SER.read()

This command receives a string from the serial port TXD/RXD.

It has no input parameter.

The return value is a Python string which contains the data received and stored in buffer at the moment of command execution. The value might be empty if no data is received.

Example:

 

a = SER.read()

 

receives a string from the serial port USIF0 handling, assigning the return value to a.

Note: The buffer available for the SER.read command is 4096 bytes. The maximum number of bytes returned by each SER.read is 1023.

 

Note: It is up to Python script to keep empty SER.read buffer.