I²C PCF8574 & HD44780 LCD Display


I2C PCF8574 & HD44780 LCD Display Modül Testi

Kullanılan Malzemeler;
Arduino UNO
HD44780
480R Direnç
PCF8574


        Code:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
long i=0;
byte newChar1[8] = { B01010, B00000, B10001, B10001, B10001, B10001, B01110, B00000 };
byte newChar2[8] = { B11111, B10101, B11111, B11111, B01110, B01010, B11011, B00000 };
LiquidCrystal_I2C lcd(0x20,16,2);

void setup()
{
  lcd.init();
  lcd.backlight();
  lcd.print(" MERHABA DUNYA");
  lcd.createChar(0, newChar1);  // Türkish Character
  lcd.createChar(1, newChar2);  // Alien Character
  lcd.setCursor(10, 0);
  lcd.write(0);
  lcd.setCursor(15, 0);
  lcd.write(1);
}

void loop
()
{
  lcd.setCursor(0, 1);
  lcd.print(i);
  i=i+1;
}

Download Library: https://yadi.sk/d/90fBWBu_atA4L

0 yorum: