'include the file that contains our instruction Include "CPU:wunderground.dld" 'declare the array needed for passing info into the instruction 'and the result code we can monitor for success / fail Dim WxData(11) Public Result 'our variables declared by Short Cut Public WindSpeed_MPH, WindDir, TRHData(2) Alias TRHData(1) = AirTemp_F, RH BeginProg Scan(1,Min,1,0) 'measure windspeed and direction PulseCount(WindSpeed_MPH,1,U4,5,1,0.2192,0) BrHalf(WindDir,1,mV5000,U2,U1,1,2500,True,20000,60,355,0) If WindDir>=360 OR WindDir<0 Then WindDir=0 'measure air temp and RH SDI12Recorder(TRHData(),C1,"0","M!",1,0) AirTemp_F=AirTemp_F*1.8+32 'post data to weather undergeround If TimeIntoInterval(0,10,Min) Then WxData() = NAN 'initalize all to NAN WxData(1) = WindDir WxData(2) = WindSpeed_MPH WxData(9) = RH WxData(11) = AirTemp_F Call wundergroundPWS(Result,"stationID","password",WxData,0) EndIf NextScan EndProg