와... 이렇게 편하게 하는데 예전에는 왜 일일이 라이브러리를 만들려고 개고생을 했던 걸까?
일단 CLCD는 16x2 라서 생각외로 출력가능한 메시지가 길지가 않아서 아쉽네
하드웨어 구성은 가변 저항쪽에 0 V를 인가하면 가장 어둡게 표현되는 듯?
(그러니까 저항으로 최대치를 하면 어두워 지는 식으로 0 Voltage로 설정되는 것으로 보임)
화이트 밸런스가 하늘로 날아가면서 액정 배경이 붉은색으로 나왔으나 실제로는 파란색에 가까움
1번 핀 부터(좌->우)
GND / VCC / 밝기(GND=MAX) / RS / RW(GND) / E + 데이터(4비트 혹은 8비트)
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.leftToRight();
lcd.setCursor(0, 0);
lcd.print("T:-10C H:100% R:50% PM12");
lcd.setCursor(0, 1);
lcd.print("PM1:100 PM25:100");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
delay(500);
lcd.scrollDisplayLeft();
// lcd.print(millis() / 1000);
}