งานที่10


Code

#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;
}

ความคิดเห็น

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

DIY Arduino Traffic Light Pedestrian Light Push Button Control (https://thecustomizewindows.com/2016/06/diy-arduino-traffic-light-pae-push-button/)

Arduino Bluetooth Control Smart Home (http://androidcontrol.blogspot.com/2015/05/arduino-bluetooth-control-smart-home.html?m=1)

IC 13