docs: public static int getConversionValue(short channel) throws IOException {
  
          // create a data buffer and initialize a conversion request payload
          byte data[] = new byte[] {
                  (byte) 0b00000001,                              // first byte, start bit
                  (byte)(0b10000000 |( ((channel & 7) << 4))),    // second byte transmitted -> (SGL/DIF = 1, D2=D1=D0=0)
                  (byte) 0b00000000                               // third byte transmitted....don't care
          };
  
          // send conversion request to ADC chip via SPI channel
          byte[] result = spi.write(data);
  
          // calculate and return conversion value from result bytes
          int value = (result[1]<< 8) & 0b1100000000; //merge data[1] & data[2] to get 10-bit result
          value |=  (result[2] & 0xff);
          return value;
      }