private void Timer_Tick(object sender, object e) { ledOn = !ledOn; if (ledOn) { grove.DigitalWrite(led, 1); //hat.Display.Fill(Colors.Beige); } else { grove.DigitalWrite(led, 0); //hat.Display.Clear(); } var b = grove.DigitalRead(butt); grove.DigitalWrite(buzzer, b); dht.Measure(); lbl.Text = string.Format("T: {0}, H: {1}", dht.TemperatureInCelsius, dht.Humidity); //hat.Display.Update(); //lbl.Text = DateTime.Now.ToLongTimeString(); }
public TSensorType ChangeState(SensorStatus newState) { Device.DigitalWrite(Pin, (byte)newState); return(this as TSensorType); }