Why do you mix two examples ? They are slightly different.
And may I say, they both look more complicated than they should be. Reading a simple button can be done by just a digitalRead().
Why do you use the ROS echo chatter ? That makes it even more complicated.
Did you use the build-in examples of the Arduino ? They are not complicated and they invite you to alter them to understand it.
How do you want to wire your button ?
A button is mostly connected to ground with a pull-up resistor to 5V. If that is used, a digitalRead() will read a LOW if the button is pressed and HIGH if the button is not pressed.
You also have to use a multimeter to see which pins of the button connect. If you rotate it 90 degrees it is not working.