Reading and Sending Sample [comwriteread]

This is a sample program that reads and sends data.

Any communication parameters can be set.

pySerial must be installed.

 

1.Input the port name to use after the program starts.

(Example) When using only one COM-1(USB)H

              /dev/ttyUSB0

2. The port is opened with the following communication parameters.

              baud rate: 9600bps

              data length: 8, stop bit: 1, parity: none

3. Select an action from the menu.

              0.Set Parameter

              1.Write

              2.Read

              3.Exit

Data reception (Read) can receive up to 50 characters at a time.

4. If the received string is less than 50 characters, it will time out in 1 second and be displayed on the screen.