Ejemplo n.º 1
0
        private async Task Begin()
        {
            Console.WriteLine("BMP280::Begin");

            //Read the device signature
            i2cBus.WriteCommand(BMP280_Address, (byte)eRegisters.BMP280_REGISTER_CHIPID);
            var buffer = i2cBus.ReadBytes(BMP280_Address, 1);

            Console.WriteLine("BMP280 Signature: " + buffer[0].ToString());

            //Set the initalize variable to true
            init = true;

            //Read the coefficients table
            CalibrationData = await ReadCoefficeints();

            //Write control register
            await WriteControlRegister();

            //Write humidity control register
            await WriteControlRegisterHumidity();
        }