Hey guys!
Come help me out about the Serial.write(); i want to write an array containing a hexadecimal data,
byte query[] = {0xF5, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C^0x00^0x00^0x00^0x00, 0xF5);
for(i=0, i<8, i++){
Serial.write(query[i]);
serial.println(query, HEX);
}
but the data duino sending is a decimal, not HEX.
I also tried this one but an error occurs.
byte query[] = {0xF5, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x0C^0x00^0x00^0x00^0x00, 0xF5);
for(i=0, i<8, i++){
Serial.write(query[i], HEX);
serial.println(query, HEX);
}
Pls help me. Give some examples so I can understand clearly
Moderator edit: Code rendered legible by the removal of italics, and the addition of CODE TAGS.