Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Battery-Powered LED Blinker Using NodeMCU ESP8266

View and Edit Project In Cirkit DesignerImage of Battery-Powered LED Blinker Using NodeMCU ESP8266

Circuit Documentation

Summary

This circuit consists of a NodeMCU V3 ESP8266 microcontroller, a red LED, and a 7V battery. The NodeMCU is powered by the battery and controls the LED, making it blink at 1-second intervals.

Component List

NodeMCU V3 ESP8266

LED: Two Pin (red)

Set battery (7V)

Wiring Details

NodeMCU V3 ESP8266

LED: Two Pin (red)

Set battery (7V)

Code Documentation

NodeMCU V3 ESP8266 Code

#define led D4

void setup() {
  // put your setup code here, to run once:
  pinMode(led, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(led, HIGH);
  delay(1000);
  digitalWrite(led, LOW);
  delay(1000);
}

This code is written for the NodeMCU V3 ESP8266 microcontroller. It defines pin D4 as the LED pin and sets it as an output in the setup() function. The loop() function then toggles the LED on and off with a 1-second delay between each state, making the LED blink.