Skip to content

Commit 35ff3b0

Browse files
committed
Changed uart timeout to 30s instead of 3000ms since busio.UART now uses seconds
1 parent 0a6828c commit 35ff3b0

5 files changed

+5
-5
lines changed

examples/gps_computer_datalogging.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# Create a serial connection for the GPS connection using default speed and
1818
# a slightly higher timeout (GPS modules typically update once a second).
1919
# Update the serial port name to match the serial connection for the GPS!
20-
uart = serial.Serial("/dev/ttyUSB0", baudrate=9600, timeout=3000)
20+
uart = serial.Serial("/dev/ttyUSB0", baudrate=9600, timeout=30)
2121

2222
# Main loop just reads data from the GPS module and writes it back out to
2323
# the output file while also printing to serial output.

examples/gps_datalogging.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
# Create a serial connection for the GPS connection using default speed and
4242
# a slightly higher timeout (GPS modules typically update once a second).
43-
uart = busio.UART(TX, RX, baudrate=9600, timeout=3000)
43+
uart = busio.UART(TX, RX, baudrate=9600, timeout=30)
4444

4545
# Main loop just reads data from the GPS module and writes it back out to
4646
# the output file while also printing to serial output.

examples/gps_echotest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# Create a serial connection for the GPS connection using default speed and
1818
# a slightly higher timeout (GPS modules typically update once a second).
19-
uart = busio.UART(TX, RX, baudrate=9600, timeout=3000)
19+
uart = busio.UART(TX, RX, baudrate=9600, timeout=30)
2020

2121
# for a computer, use the pyserial library for uart access
2222
#import serial

examples/gps_simpletest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# Create a serial connection for the GPS connection using default speed and
1818
# a slightly higher timeout (GPS modules typically update once a second).
19-
uart = busio.UART(TX, RX, baudrate=9600, timeout=3000)
19+
uart = busio.UART(TX, RX, baudrate=9600, timeout=30)
2020

2121
# for a computer, use the pyserial library for uart access
2222
#import serial

examples/gps_time_source.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import rtc
99
import adafruit_gps
1010

11-
uart = busio.UART(board.TX, board.RX, baudrate=9600, timeout=3000)
11+
uart = busio.UART(board.TX, board.RX, baudrate=9600, timeout=30)
1212

1313
gps = adafruit_gps.GPS(uart, debug=False)
1414
gps.send_command(b'PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0')

0 commit comments

Comments
 (0)