I'm newbie on Raspberry Pi.I have installed serial port using following conmand on raspian l os.
sudo apt-get install python-serial
I'm trying to access serial port communication on Raspberry Pi 3. I have created script using python. When I run the script, I got following error.
Error: serial device '/dev/ttyAMA0' does not exist
But When I used /dev/ttyS0
, it's working fine. Why?
My script here.
import serial
port = serial.Serial("/dev/ttyAMA0", baudrate=9600)
while True:
port.write("Hello world")
rcv = port.read(10)
print rcv