Phaseshift analogRead wave

To get an AC signal (positive and negative related to ground) from a 'DC square wave', you usually use a coupling capacitor. Not an opamp.

Still not clear what you're going to do with that signal.
Leo..