Home > database >  Why Arduino to control the lcd1602 display four horizontal lines?
Why Arduino to control the lcd1602 display four horizontal lines?

Time:09-20

Recruits have just began to learn, to achieve a character flickering effect, but I don't know the four line to come from?
Is behind the OK, should be able to see
The code below
# include & lt; LiquidCrystal. H>

# define for the A0
# define button2 A1
# define button3 A2
# define button4 A3 int KEY_NUM=0; Deposit//button key variables, is not equal to 1 shows a button press

,11,5,4,3,2 LiquidCrystal LCD (12);

Void setup ()
{LCD. The begin (16, 2);//initialize the LCD1602 LCD. Print (" Welcome to use!" ); Delay (1000);//delay 1000 ms LCD. The clear ();//LCD screen clearing pinMode (for, INPUT_PULLUP); PinMode (button2, INPUT_PULLUP); PinMode (button3, INPUT_PULLUP); PinMode (button4, INPUT_PULLUP);
}

Void loop ()
{LCD. SetCursor (0, 0); LCD. Print (" Exm1 Exm2 Exm3 "); LCD. SetCursor (0, 1); LCD. Println (" OK "); LCD. SetCursor (12, 1); LCD. Println (" NO "); Delay (1000); LCD. SetCursor (0, 0); LCD. Print (" Exm2 Exm3 "); LCD. SetCursor (0, 1); LCD. Println (" OK "); LCD. SetCursor (12, 1); LCD. Println (" NO "); Delay (1000);
}
  • Related