Двухстрочный дисплей 16x2
Модуль I2C LCD
Arduino UNO
Подключение
SDA модуля I2C - к pin Analog4 Arduino Uno
SCL модуля I2C - к pin Analog5 Arduino Uno
VCC модуля I2C - к +5в
GND модуля I2C - к GND
Код:
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
{
lcd.init(); // initialize the lcd
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(2,0); // строка 1, со 2 знака
lcd.print("Hello, world!");
lcd.setCursor(0,1); // строка 2, с 0 знака
lcd.print("pajalnik.ixbb.ru");
}
void loop()
{
}