• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 RTOS

Q&A Forum › Category: ESP32 › ESP32 RTOS
0 Vote Up Vote Down
Anders Gårdö asked 6 years ago

I,m working on an idea ith an ESP32 with 3 sensors checked via RTOS tasks and status reported via WiFi.
One sensor is temperature (Dallas) and another is movement (PIR) both works fine. The third is light connected to an ADC pin and that’s where the truoble is. It works as long as I don’t start a WiFi connection but if I do it will only show 4096 as a value. I have tried different pins with the same result, correct values will only show up when the WiFi i unused.

3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 6 years ago

Hi Anders.

I think you’re having a conflict between analogRead() and using the WiFi library at the same time.

You can find the same issue here and some suggestions: https://github.com/espressif/arduino-esp32/issues/102
It seems that you can only use ADC1 GPIOs when using Wi-Fi. ADC2 GPIOs conflict with the WiFi library.

Can you try using ADC1 GPIOs to your analog sensor and see if the issue is resolved?

You can check the ESP32 pinout here: https://randomnerdtutorials.com/esp32-pinout-reference-gpios/ scroll down to the “Analog to Digital Converter (ADC)” section and chose an ADC1 GPIO.

Let me know if this solves your issue.

Regards,
Sara

0 Vote Up Vote Down
Anders Gårdö answered 6 years ago

Thanks Sara
Your answer makes sense and the problem is solved!
Tanks again

0 Vote Up Vote Down
Sara Santos Staff answered 6 years ago

That’s great!
If you need further help, you just need to post a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.