งานที่10

#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
int aVal=0,tempaVal=0;
void setup()
{
  lcd.begin();
}
void loop()
{
  aVal = analogRead(A0);

  if (tempaVal != aVal)
  {
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("LDR");
    lcd.setCursor(0,1);
    lcd.print(aVal);
    delay(300);
  }
  tempaVal = aVal;
}

ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

https://www.arduitronics.com/article/22/arduino-and-motor-control-part-1

https://www.9arduino.com/article/71/โปรเจคเครื่องรดน้ำต้นไม้อัตโนมัติ-ด้วย-arduino-ราคาถูก-พร้อม-code-ตัวอย่าง

https://medium.com/sathittham/arduino-lcd-16x2-hello-world-dca09fd904f8