I am trying to understand how serial communication works on pcDuino. I am following this tutorial. As I understood it, pcDuino has two accessible serial ports by default. These are 0(rx) and 1(tx). We can access them via /dev/ttyS0 and /dev/ttyS1, respectively.
This code is written in the tutorial:
import serial myPort = serial.Serial('/dev/ttyS1', 115200, timeout = 10) myPort.write("Hello, world!") x = myPort.read() print "You entered " + x myPort.close()
So, the python script above should read the input from serial port 1 and then output it to the screen.
Now, my question is how can I test it? What input I can give to these ports? Can I use other pcDuino and send some signal to these ports via gpio port from other pcDuino? Is that safe or these two ports are intended to be used somehow else?