"""Program 4-5: Loopback test. Explore the readline() function. Put a jumper between the GP21 pin and the GP20 pin. """ import time from machine import UART, Pin uart1 = UART(1, baudrate = 9600, rx = Pin(21), tx = Pin(20)) m = uart1.write("ABCDEFGHIJKLMNO\nPQRSTUVWXYZ") time.sleep_ms(30) n = uart1.readline() print (m, n) p = uart1.readline() print (p)