BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       👉 SKETCH BUILDER

Please Help Me.I have a problem esp32 with mq2

Hello Guys
I have a final project.I am using mq2 with esp32.I can see the value for mq2 sensor when I using sensor without bylnk.I cannot see the work with bylnk.What is the problem.Please Help me.



// Fill-in information from your Blynk Template here
#define BLYNK_TEMPLATE_ID "TMPLebZli4eo"
#define BLYNK_DEVICE_NAME "SmartBox"

#define BLYNK_FIRMWARE_VERSION        "0.1.0"

#define BLYNK_PRINT Serial
//#define BLYNK_DEBUG

#define APP_DEBUG

// Uncomment your board, or configure a custom board in Settings.h
//#define USE_WROVER_BOARD
//#define USE_TTGO_T7

#include "BlynkEdgent.h"
int deger=0;
int gazokuma=4; 
BlynkTimer timer1;
void setup()
{
  Serial.begin(115200);
  delay(100);
  timer1.setInterval(1000L,sendSensor);
  BlynkEdgent.begin();
}

void loop() {
  BlynkEdgent.run();
  timer1.run();  
}
void sendSensor()
{
deger=analogRead(gazokuma);
Serial.println("Deger :");
Serial.println(deger);  
}


You have no board type un-commented, so the custom board type in Settings.h is being used.
Unless you’ve modified the Settings.h custom board type pin assignments, they will be conflicting with the pins that your sensot is connected to.

Read the “Defining your physical switch and LED” section of this topic for more info…

Pete.

Thanks I love this community.I solved this problem.I am using 36.pin thanks Pete :)))

1 Like