Hello, I have an array of bytes called values I need to extract bytes at positions 6 and 7 where it should be saved the temperature info of my sensor how can I do it?
byte temperature(){
Serial.println("---VV---");
digitalWrite(DE,HIGH);
digitalWrite(RE,HIGH);
delay(20);
Serial.flush();
if(mod.write(msgt,sizeof(msgt))==8){
digitalWrite(DE,LOW);
digitalWrite(RE,LOW);
for(byte i=0;i<10;i++){
values[i] = mod.read();
Serial.print("|");
Serial.print(values[i],HEX);
}
Serial.println("-----");
Serial.flush();
delay(3000);
}
// I'm try to return the value that should be host at position 6 and 7
return values[6,7];
}
for example:
here my values array: |1|3|4|3|E8|1|3F|3B|C3|
it should return 13F