ESP32: Blink the LED (ESP32 + Arduino series)

Поделиться
HTML-код
  • Опубликовано: 21 май 2020
  • It's the "Hello World" of IoT projects: blink an LED. Here, I'll show you how to blink the built-in LED of most ESP32 development boards. Of course, by using Arduino framework.
    ⚡️Other videos in this series:
    • ESP32 + Arduino
    (Everything you need to know about programming the ESP32 by using the Arduino Framework)
    🌍 Social
    Twitter: / savjee
    Facebook: / savjee
    Blog: savjee.be
    Become a Simply Explained member: / @simplyexplained
  • НаукаНаука

Комментарии • 23

  • @captmcloven2137
    @captmcloven2137 2 года назад +4

    WOW....you have just saved my day! Followed the steps and my board is blinking. I now know its connected and takes programs. A++ for this video. Thanks a bunch

  • @tomaskollar2279
    @tomaskollar2279 3 года назад +3

    Thx, just starting with ESP. Helped a lot! Deserves a like :D

  • @markedwards3284
    @markedwards3284 2 года назад +2

    Thank you. Just what I needed to figure out pinouts.

  • @mvvkiran
    @mvvkiran 2 года назад +1

    Thanks man, this helped!

  • @antoinekeller2786
    @antoinekeller2786 2 года назад +6

    After spending hours to pull my hair, I realized the cable I was using was not able to transfer data and was not visible as /dev/ttyUSB0. Make sure you have a correct cable...

  • @balajiuthran5028
    @balajiuthran5028 Год назад

    Thank you bro

  • @funckyjunky
    @funckyjunky 3 года назад +12

    no, it didnt work, in my case (esp32 wroom_v1)
    this is what worked for me:
    int LED_BUILTIN = 2;
    void setup() {
    pinMode (LED_BUILTIN, OUTPUT);
    }
    void loop() {
    digitalWrite(LED_BUILTIN, HIGH);
    delay(1000);
    digitalWrite(LED_BUILTIN, LOW);
    delay(1000);
    }

    • @ichbinderroboter
      @ichbinderroboter 3 года назад +5

      For the 38 Pin version you need to use LED_Builtin = 1

    • @funckyjunky
      @funckyjunky 3 года назад

      @@ichbinderroboter yes, thats true 👍

    • @AlexRib
      @AlexRib 2 года назад +1

      @@ichbinderroboter THANK YOU very much

    • @lautarocarrano6537
      @lautarocarrano6537 Год назад

      @@ichbinderroboter Thanks!

    • @BlondieSL
      @BlondieSL Год назад +1

      @@ichbinderroboter The BLUE LED is controlled by pin 2 when WiFi not configured.
      Pin 1 is the TXD0 pin, so you do NOT want to configure that as an LED controller, because in fact, with cycling pin 1 (TXD0) a person may have a problem reprogramming their board due to it being flip flopped by prev. code.
      Or was that your Point? LOL
      Are you one of those guys who, back in the day, told people to hold the CTRL +F4 key on their computers? ROFL
      NOT THAT I'VE EVER DONE THAT! _cough cough cough_ 😉😁

  • @Youngduck93
    @Youngduck93 4 года назад +9

    Thank you for the tutorial video!
    For 'ESP-WROOM-32', I had to keep the 'boot' button on my board pressed while flashing the program; otherwise the flashing process gave an error "Failed to connect to ESP32".

    • @talhawaleed8633
      @talhawaleed8633 3 года назад +1

      thanks man, that was helpful

    • @gerdsfargen6687
      @gerdsfargen6687 Год назад

      That's strange...my 2022 wroom esp32 doesn't require this yet doesn't blink the on-board led despite defining the builtin as 2.

    • @BlondieSL
      @BlondieSL Год назад

      @@gerdsfargen6687 Now that's interesting. I too saw that pin 2 for the built in BLUE LED.
      What's interesting on my 38-pin WROOM boards, is that LED_BUILTIN is not declared as part to the compiler like it is for Arduinos and perhaps other ESP boards.
      If you try to compile it with just digitalWrite(LED_BUILTIN,!digitalRead(LED_BUILTIN)); the compiler fails, complaining that LED_BUILTIN was not declared.
      So either I have to just use 2 or declare it first.
      Also, it's useless, at least on the boards I have. The BLUE LED is used for WiFi (radio communications of any kind) so it's on a lot and/or high speed flashing during major data send/receive.
      Fun times.

  • @itsdarkoboy706
    @itsdarkoboy706 Год назад

    What do you mean with HIGH to turn off but LOW to turn on? I'm confused and not sure if i should switch to ESP if it is this unintuitive...

    • @dentonhess5810
      @dentonhess5810 7 месяцев назад +1

      I believe you are correct. But I haven't done this myself yet. Sometimes inverted logic is used, but I don't think so here. I think he simply misspoke.

  • @0my
    @0my Год назад

    What programmer do you suggest

  • @komalshah4854
    @komalshah4854 6 месяцев назад +1

    How do I make it stop it just keeps blinking

    • @adnyx.9610
      @adnyx.9610 3 месяца назад

      unplug it or flash another code that doesn't make it blink

  • @moatez1187
    @moatez1187 2 года назад +1

    bro u sayed turn off and you used high -_-