You've run into the basic programming distinction between "a box" and "what's in the box".. that trips everyone at some point or another.
The variables 'input' and 'Message' aren't strings in the way you're thinking about them. They're boxes.. locations in memory where sequences of characters are stored. In formal vocabulary, they're either 'pointers' or 'references'. When you compare them to each other, you aren't comparing the sequences of characters. You're checking to see if the two variables point to the same location in memory.
(aside from not being at all what you wanted, that's generally A Bad Idea anyway)
What you want to do is compare the contents of two boxes to see if you have identical sequences of characters in two different chunks of memory. To do that, you have to locate and compare the characters one at a time.
That's a tremendously common thing to do with strings, so both the C standard library and the Arduino String class have functions that will do the job for you. The standard C function is strcmp(), but it only works on C-style strings: char arrays that have a 0 to mark the end of the character sequence. The Arduino String class has the .equals() method, which is more flexible about the types of input it will accept.
What you want is:
Code: Select all
if ( input.equals( Message )) {
// whatever
}