Activity Forums Questions & Troubleshooting Lcd(20*4) keypad shield

  • Lcd(20*4) keypad shield

  • Kudz

    Member
    July 27, 2021 at 11:53 am

    Hello Ashish

    If you are using I2C try using this library:

    https://community.controllino.com/forums/discussion/lcd204-keypad-shield/

    The code is below code below:

    #include <Wire.h>

    #include <LiquidCrystal_I2C.h>

    LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address

    void setup()

    {

    lcd.begin(20,4);

    lcd.setCursor(3,0);

    lcd.print(“Hello YouTube!”);

    lcd.setCursor(8,1);

    lcd.print(“****”);

    lcd.setCursor(0,2);

    lcd.print(“This is a demo text”);

    lcd.setCursor(8,3);

    lcd.print(“****”);

    }

    void loop()

    {

    }

    Lcd(20*4) keypad shield

    • ashu9314

      Member
      July 28, 2021 at 7:10 am

      Hello Kudz,

      Thank you so much for your response.

      Unfortunately, the link you shared with me its not working.

    • ashu9314

      Member
      July 29, 2021 at 8:35 am

      I found its Solution.

      #include <Wire.h>

      #include <LCD.h> /*Positive was not define in my L2C library*/

      #include <LiquidCrystal_I2C.h>

      LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address

      void setup()

      {

      lcd.begin(20,4);

      lcd.setCursor(3,0);

      lcd.print(“Hello YouTube!”);

      lcd.setCursor(8,1);

      lcd.print(“****”);

      lcd.setCursor(0,2);

      lcd.print(“This is a demo text”);

      lcd.setCursor(8,3);

      lcd.print(“****”);

      }

      void loop()

      {

      }

      • Lukas

        Member
        July 29, 2021 at 2:23 pm

        Hello Ashish,

        is the display working fine now?

        And what about the buttons? I assume that you connected them to A0 pin at X1 pinheader, right?

        Thanks,

        Lukas

        • ashu9314

          Member
          July 30, 2021 at 7:14 am

          Hello Lukas,

          Yes, my display is working fine.

          However, i still have some problem with my keypad. I am getting response with delay.

          Yes, i have connected it to A0 in X1

          Thanks

          Ashish

        • ashu9314

          Member
          July 30, 2021 at 11:27 am

          Hello Lukas,

          Finally i figured it out my mistake with Keypad. i was thinking that it can initialize with same value (Analog A0) as in Arduino. But i need to change it and now its working fine.

          Thanks

          Ashish

          • Lukas

            Member
            July 30, 2021 at 2:17 pm

            Great! Good job!

            Lukas

Viewing 1 - 1 of 1 replies

Log in to reply.

Original Post
0 of 0 posts June 2018
Now