# mx05v04.py MX05V, FS1000S 433MHz Demo Program v0.4 tlfong01 2021oct23hkt2202 # Pico GP Pin Assignment # GP0 = UART0 TxD = MX05 433MHz Revciver Module Data Pin # GP1 = UART0 RxD = FS1000D 433MHz Transmit Module Data Pin # Setup # To loop back, short TxD pin to RxD pin from machine import UART, Pin import utime uart0 = UART(0, baudrate = 9600, tx=Pin(0), rx=Pin(1)) def testUartLoopBackV01(): print('Begin testUartLoopBackV01(), ...') testMsg = 'Hello World' print(' writeTestMsg =', testMsg) uart0.write(testMsg) # write 5 bytes utime.sleep(0.5) bytesRead = uart0.read(20) # read up to 5 bytes print(' bytes read =', bytesRead) print('End testUartLoopBackV01().') return # *** Main *** testUartLoopBackV01() # .END ''' *** Sample output *** >>> %Run -c $EDITOR_CONTENT Begin testUartLoopBackV01(), ... writeTestMsg = Hello World bytes read = b'Hello World' End testUartLoopBackV01(). >>> '''