ADC2 with WiFi workaround

dmaxben
Posts: 108
Joined: Thu Nov 16, 2017 6:04 pm

ADC2 with WiFi workaround

Postby dmaxben » Tue Jan 30, 2018 11:32 pm

Hi,

I have a custom PCB that has some DIP switches (via a resistor network) tied to some GPIO's on ADC2.

I also need OTA flashing (WiFi) to work, so end users can easily update the firmware in their devices.

I just now discovered the ADC2 and WiFi after my PCB design has been finished and in production....a bit frustrating.

I technically only need to measure the DIP switch inputs while booting (this is for end user settings configuration).

Does anyone have any ideas of a workaround/hack for allowing the ESP32 to read values from ADC2 on startup, save the values, then ~5 seconds later, enable WiFi for the duration of the power cycle?

Or perhaps I could use an internal trigger in my code to turn WiFi on/off as needed....so at any point I can turn WiFi off temporarily, take a reading from ADC2, then turn WiFi back on?

It says here, "me-no-dev" posted 'There is a fix coming for ADC2 and WiFi soon :)'

https://github.com/espressif/arduino-esp32/issues/102

Has this been fixed yet??

Thanks
Ben

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ADC2 with WiFi workaround

Postby WiFive » Wed Jan 31, 2018 12:49 am


dmaxben
Posts: 108
Joined: Thu Nov 16, 2017 6:04 pm

Re: ADC2 with WiFi workaround

Postby dmaxben » Wed Jan 31, 2018 1:07 am

Yes, I realize it will work fine with wifi disabled... ;)

Im trying to figure out if its possible for both to work together....maybe by turning wifi off temporarily, reading ADC2, then turning wifi back on, etc.

I need both functions...wifi and ADC2. I dont need them to work at the same time, but I want to be able to switch "on the fly" between wifi on, and reading from ADC2.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ADC2 with WiFi workaround

Postby WiFive » Wed Jan 31, 2018 1:55 am

Since you "technically only need to measure the DIP switch inputs while booting" I would say stick to that until the fix comes.

Otherwise https://github.com/espressif/esp-idf/bl ... est_adc2.c

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ADC2 with WiFi workaround

Postby Ritesh » Sat Jan 12, 2019 10:49 am

Hi WiFive,

We are planning to use few ADC2 channels as per our project requirement. So, Also, In parallel, We are planning to use BLE in parallel. So, Will it create any impact into ADC2 while using BLE? will it work ADC2 channel while using BLW?

As I have heard like ADC2 can not be used with WIFi and i don't that issue has been fixed into newer SDK or not.

So, Please confirm that so that we can make our product schematic according to that.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 67 guests