Install python:
sudo apt-get install python
sudo apt-get install python-pip
pip install pyserial
Create file 'readAMA0.py'
import serial
ser=serial.Serial('/dev/ttyAMA0', 38400, timeout=30)
line=ser.readline()
print line
python readAMA0.py
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
Install python:
sudo apt-get install python
sudo apt-get install python-pip
pip install pyserial
Create file 'readAMA0.py'
import serial
ser=serial.Serial('/dev/ttyAMA0', 38400, timeout=30)
line=ser.readline()
print line
python readAMA0.py