Conflict between WiFi.h and analogRead

Posts: 1
Joined: Thu Dec 22, 2016 2:59 pm

Conflict between WiFi.h and analogRead

Postby kherNI » Thu Dec 22, 2016 3:09 pm

If I don't #include <WiFi.h> my sketch runs fine with respect to testing out the analogRead function. The device is registering the proper analog signals on pins 12, 14, 26 & 27. Some are 0 and some vary with the value from a connected sensor, all are correct. However, if I #include <WiFi.h> in my sketch all analogRead values are maxed out (4096 values). The power supply is rated for 1A as I was thinking that might be a potential issue with the amount of power required for calibration and I even supplemented with another 0.5A supply but it didn't make any difference. Reloading the sketch with the #include <WiFi.h> removed restores proper functionality in the returned analogRead functions. Note that the only change in sketches is whether I #include <WiFi.h> or not and no other WiFi functions are called in the sketch. If I do initial an AP or STA mode those function correctly but problems still persist with the analogRead function.

Who is online

Users browsing this forum: No registered users and 2 guests