Loading...
Logo
Processing Forum
Hi All!

I just wanted to know if anyone knows how to output hex code through the serial port instead of the usual ascii, for example, i need to output 02 30 30 35 03 to a serial controlled HDMI switch, please help i have no idea how to do this!

thanks in advance for any help!

Jake

Replies(3)

This isn't clear. A hex code is Ascii data... Perhaps you mean you want to send binary data, ie. raw bytes?
yes, i think? sorry i got mixed up, i need to output hex in processing is it just as simple as doing

 myPort.write("02 30 30 35 03");

or is it more complex as isn't there a hex command?
I never used the Serial library, but I see in the write() reference that you can pass it a byte or an array of bytes.