Replies: 1 comment 1 reply
-
Which analog ports do you use? ADC2 was added in Jan 22. It was not included for a long time because of interference with the WiFi usage. But I do not recall the details. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm relatively new to the ESP32 platform with Micropython, and I'm using timer interrupts for the first time.
I have "MicroPython v1.15 on 2021-04-18; ESP32 module with ESP32" on the "WROOM" board.
The overall objective is measuring relatively slow analog signals and sending data by Wi-Fi to a simple TCP socket with
s.send(sendstring)
. I have a 50 mS timer, and the ISR performs the A/D conversions, and (in this early test phase) simply sets pins with LEDs on or off based on a fixed threshold of the A/D values. I'm driving the A/D inputs with a test signal (square wave approximately 1 to 10 Hz).The Wi-Fi send is in the main
while True
loop that has atime.sleep_ms(1000)
and the Wi-Fi sends. The main loop also reads temperature from two DS1820 sensors.The LEDs should follow the test signal. They do, if I send a single WiFi message of about 50 bytes per second (main loop iteration). The problem occurs when I uncomment two other Wi-Fi sends resulting in a total of about 1k bytes per main loop iteration. The LEDs become erratic and don't follow the input signal. Possibly the Wi-Fi routines are blocking or otherwise affecting the timer interrupt service routines?
I've read the micropython docs for the ESP32 but there isn't much about interrupts and interactions with Wi-Fi. Where should I look for more information and guidance on ensuring interrupts are serviced on time while using Wi-Fi?
The timer is configured as:
The handler is:
Beta Was this translation helpful? Give feedback.
All reactions