The pins are correct and other buttons work fine in this project.
I checked other threads but none had a real answer.
Blynk app has GPS permission (I use android 7).
I also tried to mock my location (FakeGPS app) in my phone to simulate entering and exiting the area I defined but it doesn’t do anything and nothing shows up in the serial monitor.
Of course the triple dots represent irrelevant code, you can treat them as empty lines.
Posting the whole project will introduce a lot of noise and that won’t help anyone.
I don’t understand about the global variable, why should this be a global variable? I just need that value for the if you see.
This is loop and setup, the rest is just other irrelevant functions.
void setup()
{
pinMode(D3, OUTPUT);
digitalWrite(D3, LOW);
pinMode(BUILTIN_LED, OUTPUT); // set onboard LED as output
digitalWrite(BUILTIN_LED, HIGH); // led logic is inverted
// Debug console
Serial.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY);
Blynk.begin(auth, ssid, pass);
irsend.begin();
// Force the ESP into client-only mode
WiFi.mode(WIFI_STA);
timeClient.begin(); // to turn on the bias light in the morning automatically
Blynk.syncAll();
}
void loop()
{
Blynk.run();
timer.run(); // Initiates BlynkTimer
}
While potentially true… neither will absent details. “My coffee tastes funny, can you tell me why? But without tasting it yourself. And no smelling it either… just look at the cup.”
One common way others help here is by actually trying the OP’s code on their own system.
Often troubleshooting is a matter of trial and error, test and observation… not easily done without actual material to work with.