Wifi State modifies the readings of my sensor

I read by the ADC an electric signal.

If I don’t have any net programmed, the readings are correct.

But I have a net programmed, and the device doesn’t succeed to connect to it, The device measures correctly (during 30secs) and make bad measures (during 30 secs). And this sequence goes clyclically.

I have thought that it could be due to the imp consumes more energy while it searches for the net, and it could modify the measures. But those times are what what I don’t get to understand.

Are those times determined for the value inserver.connect(____, 40);?

Has my deduction any base? I mean could, this be the reason?

How solid is the voltage of your power supply? And is the peak imp current rating (400mA) well within its capability? I haven’t found the wifi state to have any effectt on my readings.

You might try logging hardware.voltage() to see how much it changes as you operate.

When I want to be confident about the accuracy of analog inputs, I read them in a loop (perhaps a couple hundred times) and then calculate the average. In that same loop, I also read hardware.voltage() and then average it to “adjust” my AI to that reading. This has helped me get significantly greater consistency with my AI readings.