ระบบทางเทคโนโลยี
ระบบทางเทคโนโลยี
Circuit + Code LCD1602
//YWROBOT
//Compatible with the Arduino IDE 1.0
//Library version:1.1
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
int VR = 0;
void setup()
{
pinMode(A0, INPUT);
lcd.init(); // initialize the lcd
}
void loop()
{
VR = analogRead(A0);
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(3,0);
lcd.print("My Project");
lcd.setCursor(0,1);
lcd.print(VR);
delay(500);
lcd.clear();
}