I am trying to communicate with a temperature humidity readout unit, a Fluke 1620, using a Raspberry Pi Pico W. Ultimate goal is to log data and make it available on our work network. I wanted to test the UART connection but I get a null response when I run the code. Here is the code I wrote.
from machine import UART, Pin
import time
uart1 = UART(0, baudrate=9600, tx=Pin(0), rx=Pin(1))
uart1.write(b'*IDN?\n')
time.sleep(0.25)
rxData = bytes()
while uart1.any() > 0:
rxData += uart1.readline()
print(rxData)
The response I get is b'\x00'
I will admit I am pretty new to Python and haven't written a real program in many years but this in my mind should work. I've written a normal Python script very similar to this and received a response. Can anyone tell me where I'm going wrong?