I just extracted a value from a string, and thanks to this forum for this.
Now I would like to convert the value in substring n.5 (the value is in hex, so n.4 bit) in binary and obtain n.4 outputs like the bit.
hex: C I would like to obtain:
parseInt(msg.payload.substr, 2) return msg;
I tried the code up but I am not able to urderstand some points, in particular how to obtain 4 outputs, one for each bit. Can you please help me? Do you have some suggestion or some similar project that can help me?
Thanks in advance.