ESP8266 WeMos D1 mini Examples

Relay Shield, use relay to control other equipment.
* NO: 5A(250VAC/30VDC), 10A(125VAC), MAX:1250VA/150W
* NC: 3A(250VAC/30VDC), MAX:750VA/90W

WeMos D1 mini Relay shield blinks LED at 5VDC

WeMos-Di-mini-RelayShield-Blink

Install WeMos D1 mini Examples of Relay shield

Unzip download file or git clone to Arduino IDE sketchbook location.

if Sketchbook Location is “~/Arduino”,

cd ~/Arduino
~/Arduino/$ git clone https://github.com/wemos/D1_mini_Examples.git

Restart Arduino IDE

Open Blink.ino:
  Arduino IDE> File> Sketchbook> D1_mini_Examples> 04. Shields> Relay_Shield> Blink

WeMos D1 mini Relay Shield Arduino Code

Blink.ino:

/*
 * Relay Shield - Blink
 * Turns on the relay for two seconds, then off for two seconds, repeatedly.
 *
 * Relay Shield transistor closes relay when D1 is HIGH
 */

const int relayPin = D1;
const long interval = 2000;  // pause for two seconds

void setup() {
  pinMode(relayPin, OUTPUT);
}

void loop() {
  digitalWrite(relayPin, HIGH); // turn on relay with voltage HIGH
  delay(interval);              // pause
  digitalWrite(relayPin, LOW);  // turn off relay with voltage LOW
  delay(interval);              // pause
}

One Thought to “ESP8266 WeMos D1 mini Relay shield blinks LED at 5VDC”

  1. I have been very pleased to uncover this fabulous website. I must thank you for your time for this particular awesome writing. I’m definitely enjoying each and every part of this particular article and that I already have this particular webpage saved as a favorite for upcoming latest articles.

Leave a Reply