How to send 07 C6 04 08 00 8A 08 FE 95 to serial

Hi!

I'm reading a scanner documentation and I need to send an instruction to the serial, to fire a manual reading.

By the manual:

Serial Port Instruction:
Host mode: 07 C6 04 08 00 8A 08 FE 95

How to send it?
I dont know if using Serial.write or Serial.print, how to convert the data, the correct syntax...

Can you help me?

Thank you.

Welcome to the forum

Is it to be sent as a series of bytes or as text ?

If the former then you could use

byte buffer[] = {0x07, 0xC6, 0x04, 0x08, 0x00, 0x8A, 0x08, 0xFE, 0x95 };
Serial.Write(buffer, sizeof(buffer);

byte buffer[] = {0x07, 0xC6, 0x04, 0x08, 0x00, 0x8A, 0x08, 0xFE, 0x95 };
Serial.Write(buffer, sizeof(buffer));

Missing parenthesis added.

1 Like

Thank you