private static async Task <HumiditySensor> CreateHumiditySensor() { var humiditySensor = new HTS221HumiditySensor(HTS221Defines.ADDRESS); await humiditySensor.InitAsync().ConfigureAwait(false); return(humiditySensor); }
private static HumiditySensor CreateHumiditySensor() { var humiditySensor = new HTS221HumiditySensor(HTS221Defines.ADDRESS); humiditySensor.Initiate(); return(humiditySensor); }
public SensorThread() { var lsm9Ds1Config = new LSM9DS1Config(); _imuSensor = new LSM9DS1ImuSensor( LSM9DS1Defines.ADDRESS0, LSM9DS1Defines.MAG_ADDRESS0, lsm9Ds1Config, new SensorFusionRTQF()); _humiditySensor = new HTS221HumiditySensor(HTS221Defines.ADDRESS); _pressureSensor = new LPS25HPressureSensor(LPS25HDefines.ADDRESS0); Start(); }
private static ISenseHat CreateSenseHat() { MainI2CDevice mainI2CDevice = new MainI2CDevice(DeviceAddress); ImuSensor imuSensor = new LSM9DS1ImuSensor( LSM9DS1Defines.ADDRESS0, LSM9DS1Defines.MAG_ADDRESS0, new LSM9DS1Config(), new SensorFusionRTQF()); imuSensor.Init(); PressureSensor pressureSensor = new LPS25HPressureSensor(LPS25HDefines.ADDRESS0); pressureSensor.Init(); HumiditySensor humiditySensor = new HTS221HumiditySensor(HTS221Defines.ADDRESS); humiditySensor.Init(); return(new SenseHat(mainI2CDevice, imuSensor, pressureSensor, humiditySensor)); }