That is more of an Arduino question, and it depends on what kind of LCD you are using.
From the vendor of your LCD, or from Arduino docs, you should get some info about which pins to connect the display to, and then which Arduino libraries to use to access it and write messages to it.
Here is an example where we connected a 0.96" graphic OLED display using an SPI interface to an Arduino Pro Micro. Just look for "0.96 SPI OLED" to find that display, many vendors have it (beware that many include the keyword SPI even though they are selling an I2C version).
The goal was to have a self-contained "dice counting flashlight", using the dice counting algo of:
http://jevois.org/tutorials/ProgrammerPythonDice.html
- First you load required libraries:
#include <SPI.h>
#include <Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>
#include <gfxfont.h>
- Then init the display
// Use hardware SPI for OLED:
#define OLED_DC 6
#define OLED_CS 7
#define OLED_RESET 8
Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS);
and, in setup():
// Init OLED display:
display.begin(SSD1306_SWITCHCAPVCC);
display.clearDisplay();
display.display();
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(0, 0);
display.print("JeVois ");
display.setTextSize(1);
display.setCursor(94, 0);
display.print("DICE");
display.setCursor(85, 9);
display.print("COUNTER");
display.setTextSize(6);
display.setCursor(20, 16);
display.print(0);
display.display();
- then you use it to display stuff in loop():
// Display pips:
int pips=12; // replace by what jevois reported
display.setTextSize(3);
display.setTextColor(WHITE);
display.setCursor(0,20);
display.print(pips);
display.display();