How to make a msg.payload send ascii codes?

I am sure it is easy/simple, but I am stuck how to exactly word the question.

I am needing to send ascii codes in a message, together with normal characters.

How do I combine them two types to one message?

Say I want to send..... ASCII 0xCB

So I want the message to be:

Look at this >0xBC< and see what you get

I'm guessing that will be close to how it is done, but not exactly.

Is this what you after - parseInt converts the hex string to decimal and then the String.fromCharCode converts that to the char

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.