|
@ -0,0 +1,27 @@ |
|
|
|
|
|
/*
|
|
|
|
|
|
ESP 32 Blink |
|
|
|
|
|
Turns on an LED on for one second, then off for one second, repeatedly. |
|
|
|
|
|
The ESP32 has an internal blue LED at D2 (GPIO 02) |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
// int LED_BUILTIN = 02; // this var is defined in pins_arduino.h for DOIT ESP32 DEVKIT V1
|
|
|
|
|
|
|
|
|
|
|
|
void setup() |
|
|
|
|
|
{ |
|
|
|
|
|
// this code run only once:
|
|
|
|
|
|
pinMode(LED_BUILTIN, OUTPUT); |
|
|
|
|
|
|
|
|
|
|
|
//serial monitor setup
|
|
|
|
|
|
Serial.begin(115200); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void loop() |
|
|
|
|
|
{ |
|
|
|
|
|
Serial.print("Hello"); |
|
|
|
|
|
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
|
|
|
|
|
|
delay(250); // wait for 0.250 seconds
|
|
|
|
|
|
|
|
|
|
|
|
Serial.print(" World!!\n"); |
|
|
|
|
|
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
|
|
|
|
|
|
delay(250); // wait for 0.250 seconds
|
|
|
|
|
|
} |