YourESP32 Sketch NodeMCU32S SimpleBLINK

From ArduinoInfo
Jump to navigation Jump to search

/* YourESP32 Example: Sketch Simple BLINK
    SEE: https://ESP32Info.Info
  - WHAT IT DOES
  Blinks an LED! The NodeMCU-32S module has a built-in LED on pin 2
  - SEE the comments after "//" on each line below
  - CONNECTIONS:
   -
   -
  - V1.00 10/02/2018
   Questions: terry@yourduino.com */

/*-----( Import needed libraries )-----*/
/*-----( Declare Constants and Pin Numbers )-----*/
#define  ledPin   2  // Specific to nodeMCU-32S module
/*-----( Declare objects )-----*/
/*-----( Declare Variables )-----*/


void setup()   /****** SETUP: RUNS ONCE ******/
{
  Serial.begin(115200);
  delay(1000); // time to bring up serial monitor
  Serial.println("Simple BLINK ");
  pinMode(ledPin, OUTPUT);

}//--(end setup )---


void loop()   /****** LOOP: RUNS CONSTANTLY ******/
{
  digitalWrite(ledPin, HIGH);  //Turn the LED ON
  delay(500);
  digitalWrite(ledPin, LOW); // OFF again
  delay(1000);

}//--(end main loop )---

/*-----( Declare User-written Functions )-----*/
//NONE yet

//*********( THE END )***********