-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ADC forcing WIFI to disconnect and lose SSID #513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Interestingly I have taken my laptop and ESP8266 hardware to work and it is working fine from there. So the same code just a different access point! I have not seen any disconnecting of the WIFI at all. The AP is the only difference. |
Also interesting, I had exactly this problem last night. First time sending readings via WiFi, running ESP8266 as a server and in Station (STS) mode. In my application I am using my Android pfodApp (www.pfod.com.au) to collect and plot the position of the garage door by reading the values from an accelerometer ADXL335 and sending them to my mobile. The completed code will show the position on a slider so I can monitor the door via the internet. What I found was that if I tried to read the ADC at 1mS intervals I could not connect to the ESP8266. While 10mS works for me it seem woefully slow for an 80Mhz chip. So for the moment, I am using 10mS intervals, but would really like some polling version of ADC read so that I could start a conversion and then keep going and come back later and pick up the result. See http://www.forward.com.au/pfod/ArduinoProgramming/pollingAnalogReadLibrary/index.html |
drmpf are you using the same modified analogRead() code that I was using?
|
yes exactly the same code |
Back at home now and exactly the same problem occurring again. WiFi connected |
I adjusted my analogRead code to the following (snippet), a 3ms delay between the reads and it seem good.
It is not dropping and staying connected and giving me about 50 samples per second still. Which may be enough to get the values I am looking for. It has been oK for 30 minutes now. |
Yiur analogog patch is the old way. In the development .json you receive de development version of the core, whit a completeky rewrited analog section and new Apu for correctly neasure A0 or Vdd voltage. |
Hi Testato Sorry I take it English is a 2nd or 3rd language for you. I really could not understand what you wrote. It appears there is a new version along with a re-written analog function that resolves the issue. But I do not know how I would use this. |
Third language plus cellphone autocotrection :-) Are you installed this core whit the .json method writed in readme.md ? |
No worries, I only know English..... You are far better than me!!! I am using this for the board http://arduino.esp8266.com/package_esp8266com_index.json so I take it there is a different url that I should use which is newer. Any chance you know the URL already? |
http://arduino.esp8266.com/staging/package_esp8266com_index.json Note that this version is often broken for various reasons. On Wed, Jul 8, 2015, 11:29 iisfaq [email protected] wrote:
|
@igrr maybe it is time to update the stable version ? |
pull request on readme update #520 |
Today I had exactly the same issue as mentioned by " iisfaq commented on 7 Jul 2015 " |
Hi @k-a-z-u, Wi-Fi connection may get lost depending on how often you sample (read) analog input. Krzysztof |
I have been following the ADC thread at #338
I implemented the change to the analaogRead() function
This gave me much more stable ADC readings when ADC is pinned to GND or 3.3V
But I have now found another issue.
My code is using the ADC along with an ACS712 Current Sensor to measure current in a 240V supply.
The code is pretty simple
Basically Connect to WIFI, loop around calling analogRead and once per minute upload this data to a web site, and just display it every second to the serial port.
When I am calling analogRead I get this type of output
Connecting to CROWE
......
WiFi connected
IP address:
192.168.2.128
Interval=1, WiFi.status=WL_CONNECTED=3
Interval=2, WiFi.status=WL_CONNECTED=3
Interval=3, WiFi.status=WL_CONNECTED=3
Interval=4, WiFi.status=WL_CONNECTED=3
Interval=5, WiFi.status=WL_DISCONNECTED=6
Interval=6, WiFi.status=WL_DISCONNECTED=6
Interval=7, WiFi.status=WL_DISCONNECTED=6
Interval=8, WiFi.status=WL_DISCONNECTED=6
Interval=9, WiFi.status=WL_DISCONNECTED=6
Interval=10, WiFi.status=WL_DISCONNECTED=6
Interval=11, WiFi.status=WL_DISCONNECTED=6
Interval=12, WiFi.status=WL_NO_SSID_AVAIL=1
Interval=13, WiFi.status=WL_NO_SSID_AVAIL=1
Interval=14, WiFi.status=WL_NO_SSID_AVAIL=1
Interval=15, WiFi.status=WL_NO_SSID_AVAIL=1
Interval=16, WiFi.status=WL_NO_SSID_AVAIL=1
Interval=17, WiFi.status=WL_NO_SSID_AVAIL=1
Interval=18, WiFi.status=WL_NO_SSID_AVAIL=1
if I simply do not call analogRead(A0) in the loop it stays connected forever.
Here is the code I am using
The text was updated successfully, but these errors were encountered: