I use a Photon to very accurately measure the timing of a analog largely amplified (opamp) signal. I noticed that the some spikes in the electronics cause distortion in the measurement. I suspect the spikes in the analog signal are caused by the current variations of the Photon during wifi communicating. Spikes happen only now and then. Altough this variation is very small, due to the large gain of the opamp, it causes distortions in the measurement. The Photon is decoupled by a large and small capacitor close to the Photon board, but the large gain of the chain of opamps amplifies every small spike.
I was thinking of disabling wifi during measurement and then re-enable it afterwards.
What would be the best strategy to do this?
I use interrrupts during measurement, so I cannot disable interrupts. But wifi.on() and .off() might work, as would Particle.connect() and .disconnect(). Would that be wise or does this method has a downside? Maybe there are some more alternatives?