************************************ mpy_uart_pico.py ************************************ by D@CC on 2024BFeb13 import os import utime from machine import UART, Pin writes to GP04 reads from GP05 GP04 must be jumpered to GP05 "alive" led is 25 functions used: uname() Pin() value() UART() write() sleep() any() read() # the following is NOT the entire program progName="mpy_uart_pico.py" print(progName) print("Jumper GP04 to GP05") #print sys info print(os.uname()) #indicate program started visually led_onboard = machine.Pin(25, machine.Pin.OUT) led_onboard.value(0) # onboard LED OFF for 0.5 sec utime.sleep(0.5) led_onboard.value(1) #self.uart = UART(1, 115200, parity=None, stop=1, bits=8, rx=Pin(rxPin), tx=Pin(txPin)) # speed of 400 only reads 4 bytes . . Doh? uart = machine.UART(1,600, parity=None, stop=1, bits=8, tx=Pin(4), rx=Pin(5)) #print uart info #uart = machine.UART(1) print(uart) #Source:http://helloraspberrypi.blogspot.com/2021/01/raspberry-pi-picomicropython-simple.html #********************************************************************************************* #/mpy_uart_pico.txt