1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Still struggling to get LCD 20x4 to work

Discussion in 'Programming/Internet' started by Mark Savoia, Oct 8, 2018.

  1. Mark Savoia

    Mark Savoia Guest

    I am now on my 4th LCD, they seem to keep failing or its just me doing something wrong. Using Arduino Mega board, and current LCD is a Adafruit 20x4 white type on blue.

    Just to keep things simple I am running the "HELLO WORLD" sketch. I am using pins 7,6,5,4,3,2, I have attached a few photos of what the LCD is looking like with different settings on the potentiometer controlling the contrast.

    For power I am using a 110 to 12v source and then through a converter to get 5v that is powering both the Arduino and the LCD. See my Fritzing wiring setup attached.

    When I install a new LCD it works fine but after a few days starts to go weird as pictured. Anything else I can look at, I have double checked all wiring, solder points, etc.

    #include <LiquidCrystal.h>

    // initialize the library by associating any needed LCD interface pin
    // with the arduino pin number it is connected to
    //const int rs = 7, en = 6, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
    LiquidCrystal lcd(7,6,5,4,3,2);

    void setup() {
    // set up the LCD's number of columns and rows:
    lcd.begin(20, 4);
    // Print a message to the LCD.
    lcd.print("hello, world!");
    }

    void loop() {

    }


    [​IMG]

    [​IMG]

    [​IMG]

    Login To add answer/comment
     

Share This Page