public SenseHat( MainI2CDevice mainI2CDevice, ImuSensor imuSensor, PressureSensor pressureSensor, HumiditySensor humiditySensor) { _mainI2CDevice = mainI2CDevice; Display = new SenseHatDisplay(_mainI2CDevice); Joystick = new SenseHatJoystick(_mainI2CDevice); Sensors = new SenseHatSensors(imuSensor, pressureSensor, humiditySensor); }
public SenseHatSensors( ImuSensor imuSensor, PressureSensor pressureSensor, HumiditySensor humiditySensor) { ImuSensor = imuSensor; PressureSensor = pressureSensor; HumiditySensor = humiditySensor; ImuSensor.OnReadingsChanged += (s, e) => ImuReadingsChanged(); PressureSensor.OnReadingsChanged += (s, e) => PressureReadingsChanged(); HumiditySensor.OnReadingsChanged += (s, e) => HumidityReadingsChanged(); }