Thank you Gilles,SimPassion wrote: ↑Sun Sep 04, 2022 10:11 amjust missed to add this part Joe, thanks for the head up
I will correct in the original post
Gilles
Really nice code.
Appreciated.
Joe
Thank you Gilles,SimPassion wrote: ↑Sun Sep 04, 2022 10:11 amjust missed to add this part Joe, thanks for the head up
I will correct in the original post
Gilles
Code: Select all
-- Hardware Ready using Arduino board for Cockpit builders
-- The ZiboMod MCDU brings :
-- 69 inputs for individual Push Buttons
-- 1 input Dial for brightness handling
-- 5 outputs for individual status leds
-- so an overall of 75 single data binding and I/O
-- could be as of the following :
------------------------------------------------------------------------------------------------------------------------------------------
-- 75 I/O ( 69 + 6 ) or 27 I/O ( 21 + 6 ) or 46 I/O ( 37 + 6 ), with related PINS for I/O
------------------------------------------------------------------------------------------------------------------------------------------
-- | INPUTS |
-- 1 INPUT : BRIGHT DIAL
-- or
-- 1 INPUT : BRIGHT ADC DIAL
-------------------------------------
-- | OUTPUTS |
-- 5 OUTPUTS : LEDs STATUS
-------------------------------------
-- | Array I/O |
-- 69 I/O : PUSH BUTTONS (MCDU Keys) with direct individual input
-- or
-- from the SI WIKI : https://siminnovations.com/wiki/index.php?title=Hw_button_array_add
-- A button array is a way to connect a lot of buttons to your project with a reduces required pin count.
-- Normally, every button would need a separate pin.
-- With the button array, you can decrease the number of pins needed by arranging the buttons into a grid (see schematic below).
-- The grid has two different types of pins, rows and columns. Rows are set as an output and will be actively driven.
-- Columns are set as input and are read to see if a button changed state.
-- https://siminnovations.com/wiki/images/0/0b/Button_array_schematic.png
-- 16 I/O : for 8 x 8 Buttons Array = 64 Push Buttons Maxi
-- 5 I/O : for 2 x 3 Buttons Array = 6 Push Buttons Maxi, the last is not used in this case
-- = 21 I/O
-- or
-- 37 I/O : for 4 x 8 pins + 1 x 5 pins = (4 x (4 x 4 buttons) + 1 x (2 x 3 buttons) Buttons Array) = 70 Push Buttons Maxi
------------------------------------------------------------------------------------------------------------------------------------------
-- IN ANY CASE : With any array, keys are assigned in the following order
-- ON PRESS :
-- [1] = press_LSK1L
-- [2] = press_LSK2L
-- [3] = press_LSK3L
-- [4] = press_LSK4L
-- [5] = press_LSK5L
-- [6] = press_LSK6L
-- [7] = press_LSK1R
-- [8] = press_LSK2R
-- [9] = press_LSK3R
-- [10] = press_LSK4R
-- [11] = press_LSK5R
-- [12] = press_LSK6R
-- [13] = press_CRZ
-- [14] = press_DES
-- [15] = press_HOLD
-- [16] = press_PROG
-- [17] = press_EXEC
-- [18] = press_INIT
-- [19] = press_RTE
-- [20] = press_CLB
-- [21] = press_MENU
-- [22] = press_LEGS
-- [23] = press_DEPARR
-- [24] = press_N1
-- [25] = press_FIX
-- [26] = press_PREV
-- [27] = press_NEXT
-- [28] = press_ONE
-- [29] = press_TWO
-- [30] = press_THREE
-- [31] = press_FOUR
-- [32] = press_FIVE
-- [33] = press_SIX
-- [34] = press_SEVEN
-- [35] = press_EIGHT
-- [36] = press_NINE
-- [37] = press_PERIOD
-- [38] = press_ZERO
-- [39] = press_MINUS
-- [40] = press_A
-- [41] = press_B
-- [42] = press_C
-- [43] = press_D
-- [44] = press_E
-- [45] = press_F
-- [46] = press_G
-- [47] = press_H
-- [48] = press_I
-- [49] = press_J
-- [50] = press_K
-- [51] = press_L
-- [52] = press_M
-- [53] = press_N
-- [54] = press_O
-- [55] = press_P
-- [56] = press_Q
-- [57] = press_R
-- [58] = press_S
-- [59] = press_T
-- [60] = press_U
-- [61] = press_V
-- [62] = press_W
-- [63] = press_X
-- [64] = press_Y
-- [65] = press_Z
-- [66] = press_SPACE
-- [67] = press_DEL
-- [68] = press_SLASH
-- [69] = press_CLR
-- [70] =
-- ON RELEASE :
-- [1] =
-- [2] =
-- [3] =
-- [4] =
-- [5] =
-- [6] =
-- [7] =
-- [8] =
-- [9] =
-- [10] =
-- [11] =
-- [12] =
-- [13] =
-- [14] =
-- [15] =
-- [16] =
-- [17] =
-- [18] = release_INIT
-- [19] =
-- [20] =
-- [21] = release_MENU
-- [22] =
-- [23] =
-- [24] =
-- [25] =
-- [26] =
-- [27] =
-- [28] =
-- [29] =
-- [30] =
-- [31] =
-- [32] =
-- [33] =
-- [34] =
-- [35] =
-- [36] =
-- [37] =
-- [38] =
-- [39] =
-- [40] =
-- [41] =
-- [42] =
-- [43] =
-- [44] =
-- [45] =
-- [46] =
-- [47] =
-- [48] =
-- [49] =
-- [50] =
-- [51] =
-- [52] =
-- [53] =
-- [54] =
-- [55] =
-- [56] =
-- [57] =
-- [58] =
-- [59] =
-- [60] =
-- [61] =
-- [62] =
-- [63] =
-- [64] =
-- [65] =
-- [66] =
-- [67] =
-- [68] =
-- [69] = release_CLR
-- [70] =