General area when it fits no where else

Moderator: Mmiscool

User avatar
By Electroguard
#44795 I need to be able to send out a serial sequence of byte values (preferably as hex if possible).

Say I need to send a hex value of 0D for instance.

I don't know if there is a print format that allows sending in hex, so I just tried sending the decimal equivalent instead (serialprintln 13).

But it appears to the serial monitor as the ascii representation of the number, rather than the actual value 13, which should be seen as a carraige return.
I also tried assigning the required value to a numeric variable (let var1 = 13) and sending the variable, but it still sends the ascii representation instead of the numeric value.

So is it possible to send a byte value to the serial port?
User avatar
By Electroguard
#44800 Thanks.
Although it's not ascii chars I'm trying to send, it's serial hex control sequences to a voice module, thereforce they will all need conversion if needs be - but at least I can do that if I must.

But is that the only way? cos I've seen that the "&" character is now available as a print option, and was wondering if perhaps there were other undocumented format options that might now be available?