Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new HD44780 LCD controller.
        /// </summary>
        /// <param name="size">Size of the device in characters. Usually 16x2 or 20x4.</param>
        /// <param name="lcdDevice">The I2C device to control LCD display.</param>
        /// <param name="rgbDevice">The I2C device to control RGB backlight.</param>
        public LcdRgb(Size size, I2cDevice lcdDevice, I2cDevice rgbDevice)
            : base(size, LcdInterface.CreateI2c(lcdDevice, true))
        {
            _rgbDevice = rgbDevice;

            InitRgb();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructs a new HD44780 based 16x2 LCD controller with integrated I2c support.
 /// </summary>
 /// <remarks>
 /// This is for on-chip I2c support. For connecting via I2c GPIO expanders, use the GPIO constructor <see cref="Lcd1602(int, int, int[], int, float, int, GpioController, bool)"/>.
 /// </remarks>
 /// <param name="device">The I2c device for the LCD.</param>
 /// <param name="uses8Bit">True if the device uses 8 Bit commands, false if it handles only 4 bit commands.</param>
 public Lcd2004(I2cDevice device, bool uses8Bit = true)
     : base(new Size(20, 4), LcdInterface.CreateI2c(device, uses8Bit))
 {
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructs a new HD44780 based 16x2 LCD controller with integrated I2c support.
 /// </summary>
 /// <remarks>
 /// This is for on-chip I2c support. For connecting via I2c GPIO expanders, use the GPIO constructor <see cref="Lcd1602(int, int, int[], int, float, int, IGpioController)"/>.
 /// </remarks>
 /// <param name="device">The I2c device for the LCD.</param>
 public Lcd1602(I2cDevice device)
     : base(new Size(16, 2), LcdInterface.CreateI2c(device))
 {
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructs a new HD44780 based 16x2 LCD controller with integrated I2c support.
 /// </summary>
 /// <remarks>
 /// This is for on-chip I2c support. For connecting via I2c GPIO expanders, use the GPIO constructor <see cref="Lcd1602(int, int, int[], int, float, int, GpioController, bool)"/>.
 /// </remarks>
 /// <param name="device">The I2c device for the LCD.</param>
 /// <param name="uses8Bit">True if the device uses 8 Bit commands, false if it handles only 4 bit commands.</param>
 public Lcd1602(I2cDevice device, bool uses8Bit = true)
     : base(new Size(16, 2), LcdInterface.CreateI2c(device, uses8Bit))
 {
 }