// Method to write the value 0x03 to the humidity control register private async Task WriteControlRegisterHumidity() { // 0x03 == 0000 0011 var WriteBuffer = new byte[] { (byte)Registers.BME280_REGISTER_CONTROLHUMID, 0x03 }; bme280.Write(WriteBuffer); await Task.Delay(1); return; }
public static void WriteRead(this I2CDevicePI device, byte[] writeBuffer, byte[] readBuffer) { device.Write(writeBuffer); device.ReadBytes(writeBuffer[0], (byte)readBuffer.Length, readBuffer); }
public static void Write(this I2CDevicePI device, byte[] data) => device.Write(data.First(), data.Skip(1).ToArray());