为什么我的I2C LCD显示器没有显示任何字母?

问题描述

我购买的液晶显示器不起作用,我也不知道为什么!当我上传代码时,显示屏只是亮起,但没有显示任何东西!有帮助吗?

我的LCD型号:具有I2C(16x2)Like this one here的1602A

地址: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() {

}

示意图: Click here to view the image

解决方法

如果您使用的是i2c,请在打开LCD程序的情况下,用螺丝起子慢慢打开i2c中的蓝色螺丝。我希望它在您转动螺丝时显示出来。这对我有用

,

我认为这是因为您使用的是var audio_player = $("#audio-player"); var play_button = $('#play'); var progress_bar = $("#progressbar"); var time = $("#time"); var mute_button = $('#mute'); var volume_bar = $('#volume'); var more_info = $('#more-info-box'); var info_tray = $("#info-tray"); var player = document.getElementById('player'); var duration = 0; var volume = 0.75; player.onloadedmetadata = function() { duration = player.duration; progress_bar.progressbar("option",{ 'max': duration }); }; player.load(); player.volume = 0.75; player.addEventListener("timeupdate",function() { progress_bar.progressbar('value',player.currentTime); time.text(getTime(player.currentTime)); },false); function getTime(t) { var m = ~~(t / 60),s = ~~(t % 60); return (m < 10 ? "0" + m : m) + ':' + (s < 10 ? "0" + s : s); } function getProgressBarClickInfo(progress_bar,e) { var offset = progress_bar.position(); var x = e.pageX - offset.left; // or e.offsetX (less support,though) var y = e.pageY - offset.top; // or e.offsetY var max = progress_bar.progressbar("option","max"); var value = x * max / progress_bar.width(); return { x: x,y: y,max: max,value: value }; } volume_bar.progressbar({ value: player.volume * 100,}); volume_bar.click(function(e) { var info = getProgressBarClickInfo($(this),e); volume_bar.progressbar('value',info.value); player.volume = info.value / info.max; }); progress_bar.progressbar({ value: player.currentTime,}); progress_bar.click(function(e) { var info = getProgressBarClickInfo($(this),e); player.currentTime = player.duration / info.max * info.value; }); play_button.click(function() { player[player.paused ? 'play' : 'pause'](); $(this).toggleClass("fa-pause",!player.paused); $(this).toggleClass("fa-play",player.paused); }); mute_button.click(function() { if (player.volume == 0) { player.volume = volume; } else { volume = player.volume; player.volume = 0; } volume_bar.progressbar('value',player.volume * 100); $(this).toggleClass("fa-volume-up",player.volume != 0); $(this).toggleClass("fa-volume-off",player.volume == 0); }); more_info.click(function() { audio_player.animate({ height: (audio_player.height() == 50) ? 100 : 50 },1000); }); 而不是lcd.begin

以下是指南:https://create.arduino.cc/projecthub/Oniichan_is_ded/lcd-i2c-tutorial-664e5a

lcd.init()