basically only the pin connected to the analog 1 is actually working. I wonder if the problem is in the circuit?
If you are getting readings from it then there is no problem with the circuit.
However, the fact it is not working like you expect shows that you are not getting the code right.
Post what you have now. However code will always do what it is written to do so there is no way from just looking at it that you can normally spot what is wrong. You need to also say what you expect it to do and what you see it doing.