아두이노 나노를 이용하여 1602a LCD 제어를 하기 위한 코드 및 스키마틱을 정리합니다. 요즈음은 1602a I2C 모듈이 나와서 4개의 핀만 연결하여 쉽게 LCD를 제어할 수 있습니다. I2C 모듈이 장착되지 않은 LCD를 제어하기 위해서는 별도의 약간은 복잡한 핀 구성이 필요합니다.
스키마틱

소스코드
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// Creates an LCD object. Parameters: (rs, enable, d4, d5, d6, d7)
void setup()
{
// set up the columns and rows:
lcd.begin(16, 2);
// Clears the LCD screen
lcd.clear();
}
void loop()
{
lcd.setCursor(3, 0);
// set the cursor to column 3, line 0
lcd.print("Hello World!");
// Print a message to the LCD.
lcd.setCursor(3, 1);
// set the cursor to column 3, line 1
lcd.print("Hello World!");
// Print a message to the LCD
}