Ejemplo n.º 1
0
        private async void InitializeLedArray()
        {
            const byte address = 0x46;
            var        device  = await I2cHelper.GetI2cDevice(address);

            if (device != null)
            {
                ledArray = new LedArray(device);
            }
        }
Ejemplo n.º 2
0
        private async Task InitializeLedArray()
        {
            const byte address = 0x46;
            var        device  = await I2cHelper.GetI2cDevice(address);

            if (device != null)
            {
                ledArray = new LedArray(device);

                ButtonPreview_Click(null, null);
            }
        }
Ejemplo n.º 3
0
        private async Task InitializeLedArray()
        {
            const byte address = 0x46;
            var        device  = await I2cHelper.GetI2cDevice(address);

            if (device != null)
            {
                ledArray = new LedArray(device);
                ledArray.Reset(Colors.Black);
            }
            else
            {
                DiagnosticInfo.Display(null, "Led array unavailable");
            }
        }
Ejemplo n.º 4
0
        public async Task <bool> Initialize()
        {
            device = await I2cHelper.GetI2cDevice(sensorAddress);

            if (device != null)
            {
                IsInitialized = WhoAmI(whoAmIRegisterAddress, whoAmIDefaultValue);

                if (IsInitialized)
                {
                    Configure();
                }
            }
            return(IsInitialized);
        }
        private const int hzOscillatorFrequency = (int)25e+6; // 25 MHz

        public async Task Init(byte address = defaultAddress)
        {
            device = await I2cHelper.GetI2cDevice(address);

            IsInitialized = device != null;
        }