Raspberry Pi Pico Tutorial - 4x4 Matrix Keypad - MicroPython

Поделиться
HTML-код
  • Опубликовано: 29 авг 2024

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

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

    *a small error made in last circuit, remember to add a resistor in series with LED to limit current.

    • @LightSkip_rb
      @LightSkip_rb 7 месяцев назад

      Can u use the number pad as an macro keyboard?

    • @NerdCaveYT
      @NerdCaveYT  7 месяцев назад

      yes you can, still input so instead of assigning a value to key, it will just act as keypress then do specific macro.
      @@LightSkip_rb

  • @leonabuehler5089
    @leonabuehler5089 Месяц назад

    This helped me a lot, thank you so much!

  • @cmxiang
    @cmxiang 12 дней назад

    Great explanation, thanks!

  • @standerdacount2945
    @standerdacount2945 Год назад +2

    THANK YOU

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

    nice clean code,thanks for sharing.

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

    Thanks!

  • @user-dz4bg7bt1d
    @user-dz4bg7bt1d 6 месяцев назад

    Could you explain about .high() and .low() in your code please?

    • @NerdCaveYT
      @NerdCaveYT  6 месяцев назад

      the .high() is to set the pin to 1 this would be the same as saying .value(1) and .low() to set pin to 0 similar to value(0)

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

    Why did you use the for loop to clear out the guess list? I was trying to get fancy with creating a separate function to clear the list using your method for other reasons and discovered a .clear() function that does the same thing.

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

      I didn't know any other way to do it, just from the limited python knowledge I have working with lists but now I also know about the .clear() function. Most of the things I make or videos was me learning it myself then documenting it, because people explain different. Thanks for the feedback

  • @hanedibenachour1717
    @hanedibenachour1717 5 месяцев назад

    hi i really hope you answer me i am confused why did you put the rows as input and why did you put the columns as outputs

    • @NerdCaveYT
      @NerdCaveYT  5 месяцев назад

      A matrix keypad is essentially a grid of switches, each switch being identified by its row and column. To determine which key is pressed, the microcontroller sets one of the lines (row or column) high (or low, depending on the setup), and then reads the other lines. If a key is pressed, it will connect a row line with a column line, and the microcontroller will read a high (or low) value on the corresponding line.
      Whether you choose to set rows or columns as inputs or outputs depends on your specific needs or constraints, such as the physical layout of your circuit or the specific requirements of your microcontroller's GPIO pins.
      So in short you can switch it

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

    How Input High on pressing as we are not giving any voltage to the pin?

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

      The rows are set as output so we set each row High Output (3.3V) then we check all the columns to see if any input goes High.

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

      @@NerdCaveYT thank u

  • @rorogamer09
    @rorogamer09 7 месяцев назад

    Why did you set the value of the row pins to 1 when you did set the pins ? When you scan the keys then are all the row pins hight, right?

    • @NerdCaveYT
      @NerdCaveYT  7 месяцев назад

      Yes you are correct, my coding is not perfect or probably most efficient sometimes (hence the double set to high), now it is an awkward situation because if I update the code on GitHub and someone watch the video they might be confused even more what is going on.

    • @rorogamer09
      @rorogamer09 7 месяцев назад

      So i can just delet „row_pin.value(1)“@@NerdCaveYT

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

    Short, simple, consice. Must be a programmer or have an analytical mind!

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

      I am a novice programmer but I do think tutorials that take 10 minutes to explain something in half the time is not needed.

  • @kamotedragon1
    @kamotedragon1 2 года назад

    Very nice'

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

    I would like to use the keypad for an lcd screen as i am doing a project which when i enter characters from the keypad they will show up on an lcd screen but when i execute the keypad does not work on the lcd and the gpios are all inputted correctly

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

      so the text appears on screen then after you press enter everything is gone? Did you clear the screen and then write the new output to your LCD?

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

    How i can print the words in horizontal form? Like as: 1 2 3 4
    No
    1
    2
    3
    4
    Good vídeo

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

      print(matrix_keys[row][col],end=" ") you will use the end = " " so it will print out in a single line

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

      @@NerdCaveYT Thanks, I'll do; Greetings from Perú

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

    good video bit any similar video which uses circuit python?

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

      I plan to just redo all the sensors and modules in CircuitPython before the week is over there will be a video available

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

    Nice Video, but where do i get the imports from.

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

      do you mean from machine import Pin?

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

    At first i thought you were European
    Then i heard of say matrix with that south african R

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

      Yes everyone can easily spot me by sound even here in China