BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Led on and then shutdown

my girlfriend asked me to make a lamp for our baby room. She wants to open the light for 20 minutes and really important no visible wire…

so I bought some cheap led I connect to a nodemcu using this tutorial https://hackaday.io/project/18816-wi-fi-christmas-lights

This project challenge was using battery, I did it, in this simple way

[Unformatted code removed by moderator]

Please edit your post and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

// BLYNK LIBRARIES //
#define BLYNK_PRINT Serial
#include <BlynkSimpleEsp8266.h>

// GLOBAL VARIABLES //
const int D7 = 13;

// TOOLS //
BlynkTimer timer;

void goToSleep() {
Serial.print(“Good Bye !”);
ESP.deepSleep(0);
}

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
digitalWrite(D7, HIGH);
timer.setInterval(1200000L, goToSleep);
}

void loop() {
// put your main code here, to run repeatedly:
Blynk.run();
timer.run();
}