DhtReading reading;// = new DhtReading(); public HomeScreen() { this.InitializeComponent(); _main = this; var _pin = GpioController.GetDefault().OpenPin(4, GpioSharingMode.Exclusive); _dht = new Dht11(_pin, GpioPinDriveMode.Input); _timer.Interval = TimeSpan.FromSeconds(1); _timer.Tick += _timer_Tick; GetNistTime(); getinitreadingtemp(); }