public bool GetSensorValue( Sensor sensor, out short value ) { byte[] reply = new byte[3]; if ( SendCommand( new byte[] { (byte) RCXCommand.GetValue, 9, (byte) sensor }, reply, 3 ) ) { value = (short) ( reply[1] | ( reply[2] << 8 ) ); return true; } value = 0; return false; }