Hey guys, I'm new to this forum but have taken Arduino up as a new hobby and am having some trouble with a project and was wondering if anyone could help me. I am programming my ESP 32 Cam through an Arduino and am currently trying to make a program which reads an IR sensor value and if movement is detected, it takes a pic and uploads it to firebase databases via WIFI. So far, I've got it to take a picture and upload the base 64 code to the database. But, am having trouble reading the analog value of the IR sensor. I am aware many of these GPIO pins are used for WIFI and the SD card. So, I am using pin 13 and have enabled the SD_MMC feature 1-bit mode. Although, when ever I try to read pin 13, it is always reading 4095. Also another important thing is I am using board manager software ESP 32 1.0.4 due to a compatibility issue with uploading to the firebase database. Although, when I do change the board manager software to ESP 32 1.0.6, the pin always reads 0 instead. Any help is appreciated, Thanks in advance. Note: In my code, I have a while loop to test the IR sensor readings, not apart of real code.
I have no idea whether it will make any difference, but the current version of the ESP32 boards file is 2.0.2
Have you tried it ?
Sadly, you can't use ADC on the ESP32 AI Thinker board if you are using wifi. See this tutorial. This is because only ADC2 pins are exposed and ADC2 cannot be used at the same time as wifi.
The tutorial states:
ADC2 pins cannot be used when Wi-Fi is used. So, if you’re using Wi-Fi and you’re having trouble getting the value from an ADC2 GPIO, you may consider using an ADC1 GPIO instead, that should solve your problem.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.