Want to use a Keypad in your Arduino projects but running out of Pins?

Sdílet
Vložit
  • čas přidán 5. 07. 2024
  • Keypads need a lot of Pins to connect to an Arduino, but by using an I2C Expander module you drop this down to only two!
  • Věda a technologie

Komentáře • 58

  • @aldeen19
    @aldeen19 Před 4 lety +3

    Thank you very much indeed, I have been looking for this technique for a while. Your videos are really helpful. I guess my word of thanks is beyond the appreciation you deserve.

  • @bonfacemuteshi1221
    @bonfacemuteshi1221 Před 3 lety +1

    Thank you for this video that has been very helpful to me. I would like to use a 5 x 4 keypad matrix in my project which offers more functionality than the 4x4 keypad. The main challenge is that the 5x4 keypad needs 9 pins while the expander takes a maximum of 8 pins. Can you please make a video with an expander fot the 5x4 keypad membrane?

  • @cableaskanison1291
    @cableaskanison1291 Před 4 lety +5

    There's a issue in this code.
    The keypad doesn't work alone.
    If you wanna use the keypad without LCD you must add
    #include
    #include
    at the beginning of the code (directives for the compilator)
    and add Wire.begin( ); in the void setup()
    (cuz the header file of the lcd does this)
    seeya

  • @Dizzifer9538
    @Dizzifer9538 Před 3 lety +1

    Great work man. Really helpful ❤️

  • @moze521
    @moze521 Před 5 lety +2

    Thank you very much for your tutorial.
    How can I use the 8X8 array keyboard?
    I tried to follow the tutorial and you can already use the 4X4 array keyboard.
    How can I make two PCF8574Ts use the array keyboard in series?
    Thanks again for your tutorial.

  • @PyroRob69
    @PyroRob69 Před 3 lety

    Just bought some of those new versioned I2C modules. Using a keypad for a combo lock is one thing, but the proper way is to use the keypad with an RFID. "Something you have, and something you know" is the proper way.

  • @strepsersrs8018
    @strepsersrs8018 Před 2 lety

    I like this Great trick to control lcd and keypad.
    Is it possible to make it by the regular lcd backpack?

  • @GaryMcKinnonUFO
    @GaryMcKinnonUFO Před 4 lety +1

    Very hand info, thanks for sharing :)

  • @SimpleEnough2k9
    @SimpleEnough2k9 Před 4 lety

    Would it be possible to make an example using the interrupt pin ? I tried different approaches but can't get it to work as planned. The only thing I would like to do is set a flag in the ISR routine when a key is pressed. Perhaps there is an I2C Keypad library that would work better than the others, I really don't know. I would really appreciate your help.

  • @AliAhmed-tm1jf
    @AliAhmed-tm1jf Před 5 lety +1

    Thanx man. That was great

  • @altamiradorable
    @altamiradorable Před 5 lety +3

    Super Yvan ! Ça a ben de l'allure ! Même en anglais ! lol ! ;)

  • @bluegru
    @bluegru Před 4 lety +2

    awesome tutorial, really helped me
    how would you add a second keypad?
    how do I name it in the code?

  • @franciscomorenovazquez9481

    Can u share the link to buy both of them?

  • @cbm80amiga
    @cbm80amiga Před 5 lety +2

    You can try to use resistors ladder and only one pin via ADC :)

    • @BrainybitsCanada
      @BrainybitsCanada  Před 5 lety +5

      If this is a lowest pins competition, than you would win by 1... But I find that using the I2C method is a lot easier, connection wise and more reliable as well... Also if you have an LCD in your project than the resistor ladder option would use 3 Pins: 2 for the i2c LCD and 1 for your Keypad resistor method :). So the I2C Keypad method would win in that scenario... Thanks for watching!

  • @namapasaran4185
    @namapasaran4185 Před 2 lety

    I was done reading your website about i2c that p3 is not connected and i found some info on the internet. The P3 pin is connected to pin16 in the i2c lcd module and its configure as output only.

  • @neelranade6322
    @neelranade6322 Před 2 lety +2

    I2c keypad library you given is invalid showing, what can i do?

  • @neelranade6322
    @neelranade6322 Před 2 lety +1

    As I have installed i2c lcd library front link you given then also it says at line creating instance for lcd that liquidcrystal_i2c is not available, what can i do?

  • @lovemadeinjapan
    @lovemadeinjapan Před 2 lety

    The I2C protocol is ALWAYS on the SDA/SCL pins, so connect those! Same with SPI: they are always on the ICSP header. No need to figure out board models. That's where the R3 layout was made for!
    I recommend doing this with regular buttons connected to the ground, not with a keypad. That way you can use it for games. Keypads give horrible ghosting on simultaneous presses.

  • @stephanedenis5394
    @stephanedenis5394 Před 5 lety +2

    Impeccable, comme d'habitude :)

  • @Dekan88
    @Dekan88 Před rokem +1

    no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int, int, int, int, int, int, int, int)' Any idea?

  • @edwintok2466
    @edwintok2466 Před rokem

    hello! Can i ask for assistance with regards to the PCF8574 where i receive a error with it not being declared despite adding all the libraries already

  • @MegaKbyrne
    @MegaKbyrne Před 2 lety

    Where is your sketch for this video to download and try out your video?

  • @RobsonWilliam82
    @RobsonWilliam82 Před 5 lety +1

    What about the PCF8575. Can it be used the same way? I could not find info about this. Thanks!

    • @BrainybitsCanada
      @BrainybitsCanada  Před 5 lety +1

      The same library should work for the PCF8575 16 I/O modules as well... You just need to change this line in the code:
      Keypad_I2C I2C_Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS, keypad_addr, PCF8575 );
      Replacing "PCF8574" with "PCF8575". Don't have one to test it out, so let me know if it works if you ever test it. Thanks for watching!

  • @alibehrouz9833
    @alibehrouz9833 Před 5 lety

    nice job

  • @gnzngonzio
    @gnzngonzio Před 5 lety +1

    Excellent data Yvan ! Thx a lot

  • @mauriciorosasb7884
    @mauriciorosasb7884 Před 4 lety

    VERY WELL,Thanks

  • @abdulhaseeb1170
    @abdulhaseeb1170 Před 3 lety

    if more push button required etc 32.... then whose protocal

  • @hajar2629
    @hajar2629 Před 5 lety +1

    thank u

  • @Dekan88
    @Dekan88 Před rokem +1

    Has anyone actually used the code? Can't find the LiquidCrystal library at the address shown in his code.

  • @sksuman4400
    @sksuman4400 Před 5 lety +1

    Sir, I am from INDIA and I am a student of ELECTRONICS AND COMMUNICATION ENGINEERING. I am the biggest fan of you. Sir if you make a video on TCA9548A with a clear concept then I will be very thankful to you. I like your way of explanation of any sensor because you always deliver a clear concept. Hope you will upload the video soon sir. Actually, sir Arduino has one SDA and SCL pin, if we have 4 I2c modules then we will be unable to connect all the modules at a time with Arduino, that's why I have requested to you. sir if you have any better idea then please let me know sir.

    • @Dani-bn7do
      @Dani-bn7do Před 3 lety

      ik its been a year since you commented
      hopefully you would answer my question
      do you recommend electronics major?i am a senior and cant makeup my mind between electronics or electrical engineering
      should i go with electronics ?

  • @pouyaahy
    @pouyaahy Před 4 lety +1

    as I understand from the video, it's not possible to use the same I2C module for both the LCD and Keypad. is this true?

    • @chuckdejarnett
      @chuckdejarnett Před 4 lety +1

      No. You have to use 2 I2C modules. He is pointing out that the I2C module for the LCD is different than the one you need for the keypad.. The I2C module for the LCD is specifically designed for the LCD and has one pin wired to a transistor and does not give all 8 pins available to the header.. So you get the one for the LCD and then the one he shows here for the keypad..

    • @pouyaahy
      @pouyaahy Před 4 lety +1

      @@chuckdejarnett
      Thank you for your complete and clear answer⁦🙏🏼⁩⁦👍🏼⁩

  • @georgevalentintrasca1682
    @georgevalentintrasca1682 Před 7 měsíci

    I can't download the LiquidCristayl_I2C library, any help please?

  • @MPElectronique
    @MPElectronique Před 5 lety

    Salut! As-tu toujours ton magasin en ligne ?..

    • @BrainybitsCanada
      @BrainybitsCanada  Před 5 lety +1

      Non je l'ai fermer l'année dernière. Pas assez de temps disponible pour m'en occuper.

  • @legoro2090
    @legoro2090 Před 3 lety

    it would have been halfull if you gave us the code you wrote for this to work

  • @user-cr5we9en2r
    @user-cr5we9en2r Před 2 lety

    lcd_and_key_pad:31:84: error: no matching function for call to 'LiquidCrystal_I2C::LiquidCrystal_I2C(int, int, int, int, int, int, int, int)'
    LiquidCrystal_I2C i2c_lcd(lcd_addr,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);
    im keep getting this error anyone know why?

  • @youssefdirani
    @youssefdirani Před 4 lety +1

    Es tu Français ?
    En tout cas merci.
    Pas de musique :)

  • @pintokitkat
    @pintokitkat Před 5 lety

    Couldn't you simply solder a wire to pin 3 on an LCD back pack?

    • @BrainybitsCanada
      @BrainybitsCanada  Před 5 lety

      Hi Andy, I tried that, I soldered a small wire directly to the P3 pin on the pcf8574t chip, but it still didn't work when connecting a Bourns encoder. So don't know if it needs something else (resistor?) but didn't test more than that... Thanks for watching!

    • @stephan83242
      @stephan83242 Před 4 lety +2

      P3 pin is connected to the transistor and then the pin16 (K on the display)

    • @carltone
      @carltone Před 3 lety +1

      I’ve bypassed the transistor connected to pin 3 and successfully used all 8 pins. Had to bit bang it. Hand soldering required.

    • @DeaBroggn
      @DeaBroggn Před 2 lety

      You can snip off the J3Y transistor and bridge the top and bottom left pads with a bit of wire, then you have P3 at the first pin. Before that the transistor will always pull P3 low.

  • @adityawigunantra8503
    @adityawigunantra8503 Před 3 lety

    please send the codes

  • @Dizzifer9538
    @Dizzifer9538 Před 3 lety

    Wow

  • @Dekan88
    @Dekan88 Před rokem

    Ok

  • @Dekan88
    @Dekan88 Před rokem

    I sent you an email. Please look it over. Thank you.

  • @asulliv1954
    @asulliv1954 Před 5 lety

    I'm sorry maybe it's just me but it seems weird listening to a person without seeing their face ,it's like watching a headless person talk,ha,but thanks for the video just next time grow a head!!laugh out loud!weird!!!

    • @tuber4tuber
      @tuber4tuber Před 5 lety

      Augustine, check out Suburban Delinquent's channel. Almost 500,000 subscribers. No head and no complaints.
      Super cool and improved graphics Yvan. Thanks for the video.