我买的液晶显示器不能工作,我不知道为什么!当我上传代码时,显示屏只是点亮了,但没有显示任何东西!有什么帮助吗?
我的液晶屏型号: 1602A,带I2C (16x2) Like this one here
地址: 0x27 (使用I2C扫描码检查)
代码:
#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.begin(); // initialize the lcd
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(1,0);
lcd.print("hello everyone");
lcd.setCursor(1,1);
lcd.print("I am Giga Blitz");
}
void loop() {
}发布于 2020-11-19 03:03:08
如果你使用的是i2c,那么用螺丝刀慢慢转动i2c上的蓝色螺丝,同时打开液晶屏程序。我希望当你打开screw.This为我工作时,它会显示出来
发布于 2020-09-13 19:30:41
我认为这是因为您使用的是lcd.begin而不是lcd.init();
这里有一个指南:https://create.arduino.cc/projecthub/Oniichan_is_ded/lcd-i2c-tutorial-664e5a
#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(1,0);
lcd.print("hello everyone");
lcd.setCursor(1,1);
lcd.print("I am Giga Blitz");
}
void loop()
{
}https://stackoverflow.com/questions/63575165
复制相似问题