I am trying to read analog values coming off of an accelerometer. It works fine without Blynk.begin, but but as soon as I add that line of code (which is required to run blynk), the analog values always read as high (4095).
Setting the pin to A0 results in the ESP returning 0. I thought that A0 was only used for Arduino boards since the analog pins on their are physically different from the digital counterparts (A0 and 0 are physically two different pins). Either way, unfortunately didn’t work.
When I use a simple voltage divider in place of the sensor (accelerometer), it seems to work with blynk there. Here is what is interesting though:
Without blynk, it reads values around 320. With blynk, it reads around 340. Nothing in the setup changed. The accelerometer values are usually pretty high (usually above 3800). Looking at the pattern from the voltage divider, maybe the ESP is artificially increasing the reading, and saturating it to 4095 in the process.
I’m using bluetooth not wifi - I don’t think that would end up being an issue (from the documentation I have read from espressif, it seems like only wifi would cause an issue).
So when I tested the voltage divider circuit, I had done it on an ADC1 pin (I have a PCB made, so its difficult for me to go in and mess with things, and only certain pins are accessible). I suppose this might be the culprit? Will test what I can tomorrow and update.