Skip to content

Commit b523aa8

Browse files
authored
Update serial-read-write.py
del whitespace
1 parent 3b900f2 commit b523aa8

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

CPX_Serial/serial-read-write.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
import board
33
import busio
44
from adafruit_circuitplayground.express import cpx
5-
5+
66
uart = busio.UART(board.TX, board.RX, baudrate=115200)
7-
7+
88
while True:
9-
9+
1010
data = uart.read(1) # read a byte
11-
11+
1212
if data is not None: # Data was received
13-
14-
output = "%0.1f\t%d\t%0.1f\r\n" % (time.monotonic(),
15-
cpx.light, cpx.temperature)
16-
uart.write(output) # Print to serial
17-
13+
14+
output = "%0.1f\t%d\t%0.1f\r\n" % (time.monotonic(),
15+
cpx.light, cpx.temperature)
16+
uart.write(output) # Print to serial
17+
1818
time.sleep(1.0)

0 commit comments

Comments
 (0)