What is this return character?

#1

I am using a relay board of sequentmicrosystems wich work with commands. All the values this commands get have a return character (↵) after the expected value like you can see in the first debug of the attached image.
Trying to work with this numbers this return symbol is giving me lot of problems. Why is this character there and how I could get rid of it?
05%20PM

Edit: I am using the exec node to talk to the relay board.

Thank you all

#2

Many ways to do it, but as I see you are expecting the data as an integer then parseInt(msg.payload) would be simple solution.

#3

Thank you so much!
Is there a way can I return the value in 8 binary using parseInt?

#4

You may want to have a look on this thread explaining the use of the string method trim() to cleanup trailing (and leading) characteres from a string.

#5

A quick google should find a list of parseInt options