Open Palomino34 opened 3 years ago
from machine import UART
uart2 = UART(2, 9600) # open uart2 with given baudrate - PA2( P2) = TX, PA3 (P1) = RX) uart2.init(9600, bits=8, parity=None, stop=1) # init with given parameters uart2.read(10) # read 10 characters, returns a bytes object uart2.read() # read all available characters uart2.write('abc') # write the 3 characters
How to use UART0, UART1....