LED and Serial comunication
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
740 B

  1. /*
  2. ESP 32 Blink
  3. Turns on an LED on for one second, then off for one second, repeatedly.
  4. The ESP32 has an internal blue LED at D2 (GPIO 02)
  5. */
  6. // int LED_BUILTIN = 02; // this var is defined in pins_arduino.h for DOIT ESP32 DEVKIT V1
  7. void setup()
  8. {
  9. // this code run only once:
  10. pinMode(LED_BUILTIN, OUTPUT);
  11. //serial monitor setup
  12. Serial.begin(115200);
  13. }
  14. void loop()
  15. {
  16. Serial.print("Hello");
  17. digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
  18. delay(250); // wait for 0.250 seconds
  19. Serial.print(" World!!\n");
  20. digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
  21. delay(250); // wait for 0.250 seconds
  22. }