Analog P6 and WIFI Shield issue

Hi Guys

Being a newbie here…
But I ran into an issue I could not find any topics or info about , so pls forgive my ignorance

I use an M7+WIFI with a sensor attached on P6 to capture a moving object…
It seems P6 ( the only way to read analog ? ) messes up the WIFI??

In the code below, the first two posts (senddata) work fine, but third one after “adc = pyb.ADC(pyb.Pin(‘P6’))” errors on the addr=… line?

I have no clue but would very happy if some help is given

Sample code:
sample.txt (1.13 KB)