I have simple app in python that should send data through serial port (serial0/ttyS0):
import RPi.GPIO as io
import time
import serial
import array
io.setmode(io.BCM)
ser = serial.Serial(port="/dev/serial0",
baudrate=38400,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
xonxoff=False,
rtscts=False,
timeout=1)
text = "200\r\n"
ser.write(bytes(text.encode('ascii')))
And this app won't to send me data through serial port. How can I check if it really send anything? Maybe I can measure voltage on GPIO pin?