private void ConnectToI2CDevices()
 {
     try
     {
         var i2cSettings = new I2cConnectionSettings(1, _i2CAddress);
         _i2CDevice = I2cDeviceFactory.Create(i2cSettings);
     }
     catch (Exception exception)
     {
         throw new SensorException("Failed to connect to HTS221", exception);
     }
 }
Esempio n. 2
0
        public MainI2CDevice(byte deviceAddress)
        {
            var i2cSettings = new I2cConnectionSettings(1, deviceAddress);

            _device = I2cDeviceFactory.Create(i2cSettings);
        }