# This program is a "Work in Progress" progName = "test_mainReadMsg_pi.py" print("progName:"+progName) while True : #continuously read and do the following time0=time.time() timeOut=time0+180 # timeOut after 3 minutes while time< timeOut : # wait for a reading of ADC0 from the Pico Board # sample the pkt stream from the Pico every 1 sec with a timeout of 90 seconds if anyReading("Pico","ADC0" ,1, timeOut)==True : parameterName="ADC0" #from the Pico stream readingComplex=reading("Pico","ADC0") readingValue=real(readingComplex) readingTime=imaginary(readingComplex) readingDT=readingTime-time0 # time relative to time0 readingUnits="volts" print("The value of", parameterName,"was ", readingValue, readingUnits,"at", readingTime, "secs:") #end if if anyButton(piButton22,"Pi",5,timeOut)==0 : if (piButton22==0): print("piButton22 was pressed") #end if #end if timeNow=time.time() while timeNow< timeOut : commandReceived="" commandReceived=inputWait("type a command",4) print("commandReceived "+"was requested") timeNow=time.time() #end while #end while