Other Arduino Codes and Videos by Robojax
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
/*
* LED blink program testing D1 Mini Development board based on ESP8266
* blinks ON, OFF, ON, OFF, then long ON, OFF
*
* Watch video instruction : https://youtu.be/4QpOErbx0nM
* Written by Ahmad Shamshiri on Aug 01, 2019
* at 17:42 in Ajax, Ontario, Canada
* for Robojax.com
*
* Get this code and other Arduino 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
*/
int LEDpin = LED_BUILTIN;
void setup() {
pinMode(LEDpin, OUTPUT); // Initialize the LEDpin pin as an output
}
// the loop function runs over and over again forever
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)
}
/*
* 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)
}
If you found this tutorial helpful, please support me so I can continue creating content like this. support me via PayPal