i have had someone code my ESp32 board with a MQ2 sensor to send an alert to an APK notification.
the issue i have is i keep getting the reading sensor value is 4095 as below
20:07:34.631 -> mq2 value is : 4095
20:07:36.767 -> mq2 value is : 4095
i know this isnt the correct reading, and when i use LPG gas near the senor the LED lights up, but the sensor readings dont change
A0 is connected to D4 on the ESP32
#include <WiFi.h> #include <IOXhop_FirebaseESP32.h>
int smokeA0 = 4;
int sensorThres = 400; #define FIREBASE_HOST "notificaton-ffcda.firebaseio.com/" #define FIREBASE_AUTH "........." #define WIFI_SSID "The only wifi" #define WIFI_PASSWORD "########"
Yes i have let the sensor burn for over 48 hours
ESp32 is powered by USB to a laptop
Sensor is powered by USB to a laptop as well, but on a separate port.
jremington:
How many times do I have to repeat it?
You certainly won't get far with this hobby if you can't take time to read, understand and act on the responses to your posts.
Perhaps the issues is i dont understand what it is you need me to do, I believe i added code tags in the second response, if i didnt, or didnt do it correctly, you are welcome to show me how.
I have seen alot of forum responses calling people out when they dont post correctly, but honestly as a first time poster, its very difficult to understand first time all the things that are required.
i did read the tips and rules on posting and thought i had done it correctly.
as in the above reply, i did read the How to use this forum, but being a first time poster, im not going to get it right the first time.
i will google connect the grounds. I must say, there should be a seperate place on the forum for newbies because it feels like everyone that knows whats going one thinks the new guys also do. if i new all these things i wouldnt be on here in the first place
there isnt an internal cause to irritate or annoy, (it seems that is what i have achieved), i am just asking for guidance. i have already poured hours into google and this forum was my last attempt at figuring out my issue
I am still getting the same readings, if i pull the D4 pin out, the readings stop. showing me that the pin selection must be correct and that there is something wrong with the coding for the actual sensor. just not sure what it could be
A reading of 4095 tells you that the output value is higher than the maximum value the ESP32 can read. Be careful with such setups, your ESP32 might get damaged by providing higher voltages than 3.3V to it's inputs.