AForge.Robotics.Surveyor.SRV1.I2CWriteWord C# (CSharp) Method

I2CWriteWord() public method

Write two bytes to I2C device.
Not connected to SRV-1. Connect to SRV-1 before using /// this method. Connection lost or communicaton failure. Try to reconnect.
public I2CWriteWord ( byte deviceID, byte register, byte firstByteToWrite, byte secondByteToWrite ) : void
deviceID byte I2C device ID (7 bit notation).
register byte I2C device register to write to.
firstByteToWrite byte First byte to write to the specified register of the specified device.
secondByteToWrite byte Second byte to write to the specified register of the specified device.
return void
        public void I2CWriteWord( byte deviceID, byte register, byte firstByteToWrite, byte secondByteToWrite )
        {
            byte[] response = new byte[100];

            // use SendAndReceive() to make sure the command was executed successfully
            int read = SendAndReceive( new byte[] { (byte) 'i', (byte) 'W', deviceID, register,
                firstByteToWrite, secondByteToWrite }, response );
        }