Skip to content

Instantly share code, notes, and snippets.

@shyamjos
Last active February 13, 2018 10:51
Show Gist options
  • Save shyamjos/97a40d4dc3d30b402d6b2b17db08a00b to your computer and use it in GitHub Desktop.
Save shyamjos/97a40d4dc3d30b402d6b2b17db08a00b to your computer and use it in GitHub Desktop.
Pin layout for connecting 16x2 LCD with arduino uno
LCD_PIN1=Arduino_PIN GND
LCD_PIN2=Arduino_PIN 5v
LCD_PIN3=Arduino_PIN GND + add resistors for
LCD_PIN4=Arduino_PIN 2
LCD_PIN5=Arduino_PIN GND
LCD_PIN6=Arduino_PIN 3
LCD_PIN11=Arduino_PIN 4
LCD_PIN12=Arduino_PIN 5
LCD_PIN13=Arduino_PIN 6
LCD_PIN14=Arduino_PIN 7
LCD_PIN15=Arduino_PIN 5v
LCD_PIN16=Arduino_PIN GND
//Example Code
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// Turn off the blinking cursor:
lcd.noBlink();
delay(3000);
// Turn on the blinking cursor:
lcd.blink();
delay(3000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment