Browse Source

LED without library

no-library
parent
commit
a4f42b91be
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      blinking-serial.ino

+ 4
- 4
blinking-serial.ino View File

@ -9,11 +9,11 @@
// this variable is defined in pins_arduino.h for DOIT ESP32 DEVKIT V1 // this variable is defined in pins_arduino.h for DOIT ESP32 DEVKIT V1
// int LED_BUILTIN = 02; // int LED_BUILTIN = 02;
int LED_ONBOARD = 02;
int LED = 02;
void setup() { void setup() {
// put your setup code here, to run once: // put your setup code here, to run once:
pinMode(LED_BUILTIN, OUTPUT);
pinMode(LED, OUTPUT);
//serial monitor setup //serial monitor setup
Serial.begin(115200); Serial.begin(115200);
} }
@ -21,10 +21,10 @@ void setup() {
void loop() { void loop() {
// put your main code here, to run repeatedly: // put your main code here, to run repeatedly:
Serial.print("ON"); Serial.print("ON");
digitalWrite(LED_BUILTIN, HIGH);
digitalWrite(LED, HIGH);
delay(500); delay(500);
// after delay // after delay
Serial.print(" - OFF\n"); Serial.print(" - OFF\n");
digitalWrite(LED_BUILTIN, LOW);
digitalWrite(LED, LOW);
delay(500); delay(500);
} }

Loading…
Cancel
Save