Hi Fratello,
Well your complaint was noise interfered with data when you switch the device in /out. If you leave it "in circuit" all the time it eliminates that possibility. By using a separate input to detect a switch the noise is confined there. You might also consider using a pin that has an interrupt available, so it changes in "real time", instead of waiting for a loop to get around to it.