LCD显示器不显示任何文字显示灯+对比度调整?

问题描述

我买了一个 Raspberry Pi 3 B+,加上一个 HD44780 2004 LCD 显示器(4x20)和其他小部件。但是在我将 LCD 焊接到 I2C 接口后,GND 接地; VCC 至 5V; SDA 转 SDA(GPIO 2);将 SCL 连接到 SCL(GPIO 3),调整对比度并通过 C# 编写一个小脚本,显示器上没有任何显示。

起初我想显示时间,但只是偶尔出现°标志。顺便说一下,我在 Visual Studio 中下载了 Iot.Device.Bindings 包。发布时,我设置脚本为发布,目标框架netcoreapp3.1和目标运行时linux-arm。当然,我已经在树莓派上下载了dotnet framework 3.1.100。

using System;
using System.Device.Gpio;
using System.Device.I2c;
using System.Threading;
using Iot.Device.CharacterLcd;
using Iot.Device.Pcx857x;

namespace L2C
{
  class Program
  {

    static void Main(string[] args)
    {
      using I2cDevice i2c = I2cDevice.Create(new I2cConnectionSettings(1,0x27));
      using var driver = new Pcf8574(i2c);
      using var lcd = new Lcd2004(registerSelectPin: 0,enablePin: 2,dataPins: new int[] { 4,5,6,7 },backlightPin: 3,backlightBrightness: 0.1f,readWritePin: 1,controller: new GpioController(PinNumberingScheme.Logical,driver));

      int _counter = 0;

      while (true)
      {
        lcd.Clear();
        lcd.Write(_counter.ToString());
        _counter++;
        Thread.Sleep(1000);
      }
    }
  }
}

我不知道那是什么。希望得到快速有用的答案。

问候 妮可

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)