コード例 #1
0
        /// <summary>
        /// LCD1602
        /// 未测试
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            var i2cLcdDevice = I2cDevice.Create(new I2cConnectionSettings(busId: 1, deviceAddress: 0x3E));
            var i2cRgbDevice = I2cDevice.Create(new I2cConnectionSettings(busId: 1, deviceAddress: 0x62));

            using (LcdRgb display = new LcdRgb(new Size(16, 2), i2cLcdDevice, i2cRgbDevice))
            {
                display.Clear();
                display.Write("Hello World!");
            }
        }
コード例 #2
0
ファイル: Pcf8574tSample.cs プロジェクト: skang0401/iot
        static void SetBacklightColorTest(LcdRgb lcd)
        {
            Color[] colors = { Color.Red,   Color.Green,     Color.Blue,         Color.Aqua, Color.Azure,
                               Color.Brown, Color.Chocolate, Color.LemonChiffon, Color.Lime, Color.Tomato, Color.Yellow };

            foreach (var color in colors)
            {
                lcd.Clear();
                lcd.Write(color.Name);

                lcd.SetBacklightColor(color);
                System.Threading.Thread.Sleep(1000);
            }

            lcd.Clear();
            lcd.SetBacklightColor(Color.White);
        }