public Dht22Sensor GetHumiditySensor(byte pin) { lock (_dht22States) { if (!_dht22States.ContainsKey(pin)) { _dht22States[pin] = new Dht22State(); } } return(new Dht22Sensor(pin, DHT22SensorKind.Humidity, this)); }
public Dht22Sensor GetTemperatureSensor(int pin) { lock (_dht22States) { if (!_dht22States.ContainsKey(pin)) { _dht22States[pin] = new Dht22State(); } } return(new Dht22Sensor(pin, DHT22SensorKind.Temperature, this)); }