"""Program 4-1: Write 'hello world' to UART1 once every second UART1 Tx is assigned to the GP20 pin. """ import time from machine import UART, Pin uart1 = UART(1, baudrate = 9600, tx = Pin(20)) while True: n = uart1.write('hello world\r\n') print(n, 'bytes sent') time.sleep(1)