コード例 #1
0
ファイル: Program.cs プロジェクト: valoni/NETMF44
        public static void Main()
        {
            // Pins PE5..PE2 are connected to rows, PD7..PD3 to columns
            _keypad              = new Keypad4X3(Pin.PE5, Pin.PE4, Pin.PE3, Pin.PE2, Pin.PD7, Pin.PD4, Pin.PD3);
            _keypad.KeyReleased += KeypadKeyReleased;
            _keypad.KeyPressed  += KeypadKeyPressed;

            _keypad.StartScan();

            Thread.Sleep(Timeout.Infinite);
        }
コード例 #2
0
        public static void Main()
        {
            _keypad = new Keypad4X3(
                // Rows
                STM32H7.GpioPin.PE5, STM32H7.GpioPin.PE4, STM32H7.GpioPin.PE3, STM32H7.GpioPin.PE2,
                // Columns
                STM32H7.GpioPin.PD7, STM32H7.GpioPin.PD4, STM32H7.GpioPin.PD3);
            _keypad.KeyReleased += KeypadKeyReleased;
            _keypad.KeyPressed  += KeypadKeyPressed;

            _keypad.StartScan();

            Thread.Sleep(Timeout.Infinite);
        }