Setting Up D1 Mini NodeMCU ESP8266 Wifi with Arduino Example 1/2

Project Video
Project Details

This code is for video on how to start using D1 Mini Wifi development board with Arduino.

Boards manager link:

https://arduino.esp8266.com/stable/package_esp8266com_index.json    

keywords: NodeMCU , esp32, wifi

See Basic Blink sketch with pin mapping using D1 Mini Wifi Development board Example 2/2

Project Code


/*
 * LED blink with pin Mapping for ESP8266 Di Mini
Written By Ahmad Shamshiri for Robojax.com
 in August 01, 2019 in Ajax, Ontario, Canada
 * Watch video instruction : https://youtu.be/4QpOErbx0nM
 * 
 * Get this code and other Arduono codes from Robojax.com
If you found this tutorial helpful, please support me so I can continue creating 
content like this. You can support me on Patreon http://robojax.com/L/?id=63
or make donation using PayPal http://robojax.com/L/?id=64
*/

//LED_BUILTIN
static const uint8_t D0   = 16;
static const uint8_t D1   = 5;
static const uint8_t D2   = 4;
static const uint8_t D3   = 0;
static const uint8_t D4   = 2;
static const uint8_t D5   = 14;
static const uint8_t D6   = 12;
static const uint8_t D7   = 13;
static const uint8_t D8   = 15;
static const uint8_t D9   = 3;
static const uint8_t D10  = 1;
int LEDpin = D7;
void setup() {
  pinMode(LEDpin, OUTPUT);     // Initialize the LEDpin pin as an output
}


void loop() {
  digitalWrite(LEDpin, LOW);// Turns the blue LED ON (see video why)
  delay(300);// Wait for 300 milliseconds
  digitalWrite(LEDpin, HIGH);// Turns the blue LED OFF  (see video why)
  delay(300);// Wait for 300 milliseconds  
  

  digitalWrite(LEDpin, LOW);
  delay(300);
  digitalWrite(LEDpin, HIGH);
  delay(300); 

  digitalWrite(LEDpin, LOW);
  delay(1000);// Wait for a second (keep it ON)
  digitalWrite(LEDpin, HIGH);
  delay(1000); // Wait for a second (keep it OFF)
}