Hello
I have a slider node that I slide from 0 to 40. The output is obviously a decimal number.
I need to convert this to hex, so I used var hexstring1 = "0x" + msg.payload.toString(16);
However, when I try to load this value into a binary buffer, say msg.payload = Buffer.from(0x00, [hexstring1], 0x00, 0x01);, I get an error.
How do I convert the decimal number so I can store it in the buffer?
I do have other values I am setting in the buffer, which are numbers.