មេរៀនទី ៨: LCD Display with Arduino

Fire LED Lesson (2D)

មេរៀនទី ៨: LCD Display with Arduino

======================================================================================================================

📘 មេរៀនទី ៨: LCD Display with Arduino


មេរៀននេះបង្ហាញពីរបៀបប្រើ LCD 16x2 ជាមួយ Arduino UNO ដើម្បីបង្ហាញអក្សរ និងលេខ។

ឧបករណ៍ត្រូវការ:
  • Arduino UNO
  • LCD 16x2
  • Potentiometer 10kΩ
  • Jumper Wires
  • Breadboard

🔌 របៀបភ្ជាប់ LCD 16x2 ទៅ Arduino

  • VSS → GND
  • VDD → 5V
  • V0 → Middle Pin Potentiometer
  • RS → Pin 12
  • RW → GND
  • E → Pin 11
  • D4 → Pin 5
  • D5 → Pin 4
  • D6 → Pin 3
  • D7 → Pin 2
  • A (LED+) → 5V (with resistor)
  • K (LED−) → GND

💻 Arduino Code


#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  lcd.print("Hello Arduino");
}

void loop() {
  lcd.setCursor(0, 1);
  lcd.print("LCD 16x2 Ready");
}

លទ្ធផល:
LCD នឹងបង្ហាញ "Hello Arduino" នៅជួរដំបូង និង "LCD 16x2 Ready" នៅជួរទីពីរ។

Post a Comment

0 Comments