具有I2C的CD 16x2不想显示字符

时间:2019-06-25 21:31:36

标签: arduino-uno

我的液晶显示器有问题。不想显示“你好”;(

仅工作于背光/无背光

Vcc => 5v引脚 GND => G针

SCL => A5引脚 SDA => A4针

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

// Set the LCD address to 0x27 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup()  
{
  lcd.init();
  lcd.backlight();
  lcd.setCursor(0,0); 
  lcd.print("LCD & I2C");
  delay(500);
  lcd.setCursor(0,1); 
  lcd.print("**********");
}

void loop() 
{
  lcd.clear();
  lcd.setCursor(0,0);
   lcd.backlight();
   lcd.print("Hello");
   delay(5000);
   lcd.noBacklight();

   delay(500);
}

0 个答案:

没有答案