Exemplo n.º 1
0
		public LSM9DS1ImuSensor(
			byte accelGyroI2CAddress,
			byte magI2CAddress,
			LSM9DS1Config config,
			SensorFusion fusion)
			: base(fusion)
		{
			_accelGyroI2CAddress = accelGyroI2CAddress;
			_magI2CAddress = magI2CAddress;
			_config = config;
			SampleRate = 100;
		}
 public LSM9DS1ImuSensor(
     byte accelGyroI2CAddress,
     byte magI2CAddress,
     LSM9DS1Config config,
     SensorFusion fusion)
     : base(fusion)
 {
     _accelGyroI2CAddress = accelGyroI2CAddress;
     _magI2CAddress       = magI2CAddress;
     _config    = config;
     SampleRate = 100;
 }
Exemplo n.º 3
0
		private static async Task<ImuSensor> CreateImuSensor()
		{
			var lsm9Ds1Config = new LSM9DS1Config();

			var imuSensor = new LSM9DS1ImuSensor(
				LSM9DS1Defines.ADDRESS0,
				LSM9DS1Defines.MAG_ADDRESS0,
				lsm9Ds1Config,
				new SensorFusionRTQF());

			await imuSensor.InitAsync().ConfigureAwait(false);
			return imuSensor;
		}
Exemplo n.º 4
0
		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();
		}