WiFi / ADC issue
WiFi / ADC issue
Postby Gorkde » Tue Jun 14, 2016 11:33 pm
When reading the ADC as long as WiFI is enalbled the ADC jumps up and down up to 10 values which renders the module useless for me.
I did want to use the ESP as Heart of my new product which needs to read sensors while on the other hand sends data on WiFi.
Since I'm using Blynk whicht checks all the time if still connected I can't just simply disable WiFi.
I'm using Arduino IDE and the available Libs.
Any solution?
I did want to use the ESP as Heart of my new product which needs to read sensors while on the other hand sends data on WiFi.
Since I'm using Blynk whicht checks all the time if still connected I can't just simply disable WiFi.
I'm using Arduino IDE and the available Libs.
Any solution?
Re: WiFi / ADC issue
Postby Gorkde » Thu Jun 16, 2016 10:25 pm
Im using it with the latest Arduino IDE with the latest ESP8266 libraries from Github (http://arduino.esp8266.com/stable/packa ... index.json).
In my case the reading should be 66 (or 0 if AIN is put to GND) but once the code has run some time the value goes up around 7 points and jumps up and down in this range.
I found many people complaining about this (nodeMCU and Arduino users) and it's neiter a problem with my power nor one of some kind of radio interference (shielded the comlete board and used battery).
I tried with ESP8266-12 standalone as well as with Wemos D1.
As soon as I WiFi.disconnect(); the reading is correctly at 66 (or 0 if AIN is put to GND)
Most people are interpolating the read values to get a stable result but that's not a good way.
My code for testing is:
(You need to wait a bit since readings in the beginning are correct, then suddenly they start to go up as if some kind of capacitor is filling up)
In my case the reading should be 66 (or 0 if AIN is put to GND) but once the code has run some time the value goes up around 7 points and jumps up and down in this range.
I found many people complaining about this (nodeMCU and Arduino users) and it's neiter a problem with my power nor one of some kind of radio interference (shielded the comlete board and used battery).
I tried with ESP8266-12 standalone as well as with Wemos D1.
As soon as I WiFi.disconnect(); the reading is correctly at 66 (or 0 if AIN is put to GND)
Most people are interpolating the read values to get a stable result but that's not a good way.
My code for testing is:
(You need to wait a bit since readings in the beginning are correct, then suddenly they start to go up as if some kind of capacitor is filling up)
Code: Select all
#include <ESP8266WiFi.h>
char WLANname[] = "***";
char WLANpw[] = "***";
void setup()
{
Serial.begin(115200);
WiFi.begin(WLANname, WLANpw);
Serial.println(" ");
while (WiFi.status() != WL_CONNECTED) {
delay(300);
Serial.print(".");
}
Serial.println("\nCONNECTED");
// WiFi.disconnect();
}
void loop()
{
Serial.println(analogRead(0));
delay(100);
}
Last edited by Gorkde on Thu Jun 16, 2016 11:20 pm, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 5 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.