Membrane Switch Keypad Arduino Tutorial - Elegoo The Most Complete Starter Kit

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ย. 2024

ความคิดเห็น • 10

  • @HamedAdefuwa
    @HamedAdefuwa  3 ปีที่แล้ว +3

    For those wondering I managed to get a really basic password going, heres the code;
    void loop()
    {
    char customKey = customKeypad.getKey();

    if (customKey == '6')
    {
    x = 1;
    Serial.println("
    *");
    }
    while(x == 1)
    {
    char customKey2 = customKeypad.getKey();
    if (customKey2 == '5')
    {
    Serial.println("
    Password Correct
    ");
    x = 0;
    }
    }
    x = 0;
    }

    • @jamo8298
      @jamo8298 8 หลายเดือนก่อน

      How could I add errors to this so that if u get one wrong it resets back to the start

  • @jordanb722
    @jordanb722 3 ปีที่แล้ว +1

    More diligent than I would be. Wires are wires, regardless of colours :p. This channel is an awesome idea btw, what a great way to solidify knowledge and learn things along the way! I'm going to have to copy this myself (though I'm just starting my fourth year)

    • @HamedAdefuwa
      @HamedAdefuwa  3 ปีที่แล้ว

      Thank you! 🙏 I would LOVE to see you do the same lol I was flying through first year but now with covid online lectures it's a grind. I get super motivated seeing what other students are doing. I stalk all EE posts on reddit, keeps me from going insane learning the boring fundamentals. Let me know if you do start TH-cam please.

  • @jordanb722
    @jordanb722 3 ปีที่แล้ว

    Also, here's a tip for your little modifications (If you haven't already noticed); You only set customKey once, but you ask for it to be two different values in your code. You need to add something to allow new keypresses to be collected between the if statements :).

    • @HamedAdefuwa
      @HamedAdefuwa  3 ปีที่แล้ว

      Uhh of course! It just needed a second variable 🤣 thanks! Will try this today. Ideally I'd like to get that damn LED working as well.
      Edit: I think a variable as a flag would be easier than a second variable. So X=1 then outside that, if customKey = 7 && X=1

    • @HamedAdefuwa
      @HamedAdefuwa  3 ปีที่แล้ว +1

      THIS TOOK ME AN INSANE AMOUNT OF TIME! 😂
      There are definitely some improvements to be done but it works!
      void loop()
      {
      char customKey = customKeypad.getKey();

      if (customKey == '6')
      {
      x = 1;
      Serial.println("
      *");
      }
      while(x == 1)
      {
      char customKey2 = customKeypad.getKey();
      if (customKey2 == '5')
      {
      Serial.println("
      Password Correct
      ");
      x = 0;
      }
      }
      x = 0;
      }

  • @madaimescobar6175
    @madaimescobar6175 ปีที่แล้ว

    hey man would you mind sharing that pdf? I cannot find it in their website and my kit came with another pdf in the CD

  • @tritun5154
    @tritun5154 2 หลายเดือนก่อน

    these are good attempts...imagine if you had chatgpt 3 years ago as a tutor

    • @HamedAdefuwa
      @HamedAdefuwa  2 หลายเดือนก่อน +1

      i cant go an hour now without chatgpt xD