/// <summary> /// Testing method for TempHumidSI70 module (function never returns) /// </summary> static void TestTempHumidSi70() { //test button, light sense, gas sense, temp humid TempHumidSI70 tempSensor = new TempHumidSI70(GHIElectronics.TinyCLR.Pins.G400S.I2cBus.I2c1); while (true) { Debug.WriteLine($"temp & humid : {tempSensor.TakeMeasurement().Temperature} - {tempSensor.TakeMeasurement().RelativeHumidity}"); Thread.Sleep(200); } }
public double GetTemperature() { var measurement = tempHumid.TakeMeasurement(); return(measurement.Temperature); }
public double GetHumidity() { var measurement = tempHumid.TakeMeasurement(); return(measurement.RelativeHumidity); }