Hi All,
I want to use ten adc inputs on an ESP32, but there are only eight on ADC1. ADC2 has another ten, but they cannot be used while wifi is active. I am not using wifi for this project so I would like to disable it and use two ADC2 channels. How do I do that?
Thanks,
How to disable wifi on ESP32
- rcolistete
- Posts: 352
- Joined: Thu Dec 31, 2015 3:12 pm
- Location: Brazil
- Contact:
Re: How to disable wifi on ESP32
It is not currently possible using MicroPython mainline/official, see this GitHub issue #6219 "[ESP32] Read from ADC2 Pins".
But the MicroPython ESP32 Lobo firmware supports ADC2 .
But the MicroPython ESP32 Lobo firmware supports ADC2 .
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).
Re: How to disable wifi on ESP32
Thanks @rcolistete,
I installed the Lobo version of Micropython, and found it has lots of good features as well as supporting ADC2. However it seems my board, a Heltec WiFi Kit 32, does not. When I enter the command
in the REPL to define 25 as an ADC pin I get these errors
So it would seem I'm stuck. The board just doesn't support it.
Thanks again for your help, much appreciated.
I installed the Lobo version of Micropython, and found it has lots of good features as well as supporting ADC2. However it seems my board, a Heltec WiFi Kit 32, does not. When I enter the command
Code: Select all
adc = ADC(Pin(25),unit=2
Code: Select all
E (413001) RTC_MODULE: /home/ian/MicroPython_ESP32_psRAM_LoBo/Tools/esp-idf/components/driver/rtc_module.c:1167 (adc_gpio_init):ADC unit error, only support ADC1 for now
E (413006) RTC_MODULE: /home/ian/MicroPython_ESP32_psRAM_LoBo/Tools/esp-idf/components/driver/rtc_module.c:1197 (adc_set_data_width):ADC unit error, only support ADC1 for now
Thanks again for your help, much appreciated.
Re: How to disable wifi on ESP32
@rcolistete one more question if I may.
I have found with the Lobo version of Micropython I can no longer use the RMT peripheral. In the documentation it states that the RMT module is used to implement Neopixel, DHT and 1-wire, so it's there. But how to use it? I tried importing it from machine, but it says RMT does not exist. in the REPL help(machine) does not list it. Has this module been disabled in this build?
Thanks,
I have found with the Lobo version of Micropython I can no longer use the RMT peripheral. In the documentation it states that the RMT module is used to implement Neopixel, DHT and 1-wire, so it's there. But how to use it? I tried importing it from machine, but it says RMT does not exist. in the REPL help(machine) does not list it. Has this module been disabled in this build?
Thanks,
- rcolistete
- Posts: 352
- Joined: Thu Dec 31, 2015 3:12 pm
- Location: Brazil
- Contact:
Re: How to disable wifi on ESP32
About ADC2, try other pins after reading your board pinout, in some boards some ADC2 pins are used.
I don't have experience with RMT.
I don't have experience with RMT.
My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).
Re: How to disable wifi on ESP32
Thanks @rcolistete I'll try the others.
RMT (remote control) peripheral was originally to use with IR controllers, but is has found a few other uses as well. It seems everything is 2.4GHz these days anyway, I don't know if IR is used much any more.
RMT (remote control) peripheral was originally to use with IR controllers, but is has found a few other uses as well. It seems everything is 2.4GHz these days anyway, I don't know if IR is used much any more.