Lesson 2.1: Connect USB- GPS/GNSS to Raspberry Pi

preview_player
Показать описание
Key commands:

lsusb

dmesg | grep tty

cd /dev/

ls

cat /dev/ttyUSB0
cat /dev/ttyACM0

Next video's python code:

import serial
import time

# Input Parameters
#port = '/dev/ttyACM0'
port = '/dev/ttyUSB0'

ser = serial.Serial(port, baudrate = 9600, timeout = 0.5)

filep=open(OutputFile, "w")

try:
while True:
Line=str(Line)

print (Line)


except KeyboardInterrupt:
Рекомендации по теме