Example #1
0
 // Write a byte to the magnetometer
 private void writeByteMAG(byte regAddr, byte value)
 {
     byte[] values   = new byte[value];
     byte[] WriteBuf = new byte[] { regAddr, value };
     I2CACC.Write(WriteBuf);      // The magnetometer uses the same I2C slave address as the accelerometer
 }
Example #2
0
 // Write a byte to the accelerometer
 private void writeByteACC(byte regAddr, byte value)
 {
     byte[] values   = new byte[value];
     byte[] WriteBuf = new byte[] { regAddr, value };
     I2CACC.Write(WriteBuf);
 }