Arduino UNO – Potansiyemetre ve LCD Kullanımı

Devre Şeması

Sağdaki potansiyometre Analog IN için kullanılan potansiyometredir. Soldaki LCD’nin ekran koyuluk miktarını ayarlayan potansiyometredir.

Arduino IDE Kodları

#include <LiquidCrystal.h>

int analog0 = 0;

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

void setup()
{
  lcd_1.begin(16, 2); // Set up the number of columns and rows on the LCD.
  lcd_1.print("A0 Giris Bilgisi");
}

void loop()
{
  analog0 = analogRead(A0);
  lcd_1.setCursor(0, 1);
  lcd_1.print(analog0);
  delay(10);
}

Yorum bırakın