Button array cdu
Button array cdu
Hi
I am currently creating a CDU for my sim.
I mis read the limitations of creating a button array for the keypad of 8 rows/ columns.
I was thinking this was per array, and not per arduino!
8 row/column is not sufficient for my cdu.
What options do i have for creating the key pad with about 65 buttons?
Grtz
I am currently creating a CDU for my sim.
I mis read the limitations of creating a button array for the keypad of 8 rows/ columns.
I was thinking this was per array, and not per arduino!
8 row/column is not sufficient for my cdu.
What options do i have for creating the key pad with about 65 buttons?
Grtz
Re: Button array cdu
Not sure it’s per Arduino. Have you tried? In any case if you only need 65 then just add an extra single button to the 64 in the array and you have what you need.
Air Manager panels at https://www.experimentalsimavionics.com
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Youtube Channel https://www.youtube.com/channel/UC8ZqXX ... kfZMq5BKig
Air Manager API Tutorial Video Series https://youtube.com/playlist?list=PLNr0 ... baT4gJKg5D
Re: Button array cdu
It's not per Arduino as far as I know.
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Button array cdu
Hmmm...
I know the wiki says 8x8 but I did this some time ago for the Zibo as a test and it worked.
However you can have more than 1 button array per board as long as there are enough pins. I did one some time back in the beta but cannot find it. If i do find it I will post here to save you some time.
try this
The siff might be on the forum. I think I sent it to Gilles @SimPassion back then.
Keith
I know the wiki says 8x8 but I did this some time ago for the Zibo as a test and it worked.
However you can have more than 1 button array per board as long as there are enough pins. I did one some time back in the beta but cannot find it. If i do find it I will post here to save you some time.
try this
The siff might be on the forum. I think I sent it to Gilles @SimPassion back then.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
Re: Button array cdu
8x8 yes, but then just start another.
- Keith Baxter
- Posts: 4685
- Joined: Wed Dec 20, 2017 11:00 am
- Location: Botswana
Re: Button array cdu
100%
I did that already. Cannot find it. Got lost when we had the beta CTD issues.
I did a inline function version
Trying to see if I can find it.
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board, 32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card
-
- Posts: 5339
- Joined: Thu Jul 27, 2017 12:22 am
Re: Button array cdu
Here's what I've made already in the Z_2D_XP MCDU, which can be used straight forward, for hardware only feature, with masking the bitmap on screen display (Air Manager feature on Panels)
Code: Select all
-------------------------------------
-- | 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
------------------------------------------------------------------------------------------------------------------------------------------
Code: Select all
if bln_btnarray == true then
prtdbg("BUTTON ARRAY","SELECTED "..arr_str,"dbg07",true)
if arr_str == str_arr1 then
hw_btn_arr1 = hw_button_array_add("MCDU Push Buttons Array#1 : 8 x rows & 8 x columns", 8, 8, pr_arr6_press, pr_arr6_release)
hw_btn_arr2 = hw_button_array_add("MCDU Push Buttons Array#2 : 2 x rows & 3 x columns", 2, 3, pr_arr7_press, pr_arr7_release)
elseif arr_str == str_arr2 then
hw_btn_arr1 = hw_button_array_add("MCDU Push Buttons Array#1 : 4 x rows & 4 x columns", 4, 4, pr_arr1_press, pr_arr1_release)
hw_btn_arr2 = hw_button_array_add("MCDU Push Buttons Array#2 : 4 x rows & 4 x columns", 4, 4, pr_arr2_press, pr_arr2_release)
hw_btn_arr3 = hw_button_array_add("MCDU Push Buttons Array#3 : 4 x rows & 4 x columns", 4, 4, pr_arr3_press, pr_arr3_release)
hw_btn_arr4 = hw_button_array_add("MCDU Push Buttons Array#4 : 4 x rows & 4 x columns", 4, 4, pr_arr4_press, pr_arr4_release)
hw_btn_arr5 = hw_button_array_add("MCDU Push Buttons Array#5 : 2 x rows & 3 x columns", 2, 3, pr_arr5_press, pr_arr5_release)
end
else
Re: Button array cdu
Thanks guys for the quick help
I did try a second button array on the same arduino; this did not work, so i was afraid there was a limit of a max per arduino.
So, i guess i made an error , in connecting or coding.
but good to hear there is no max per arduino, ok , only max is connections...
again thanks, i will go and try again from here
I did try a second button array on the same arduino; this did not work, so i was afraid there was a limit of a max per arduino.
So, i guess i made an error , in connecting or coding.
but good to hear there is no max per arduino, ok , only max is connections...
again thanks, i will go and try again from here
-
- Posts: 5339
- Joined: Thu Jul 27, 2017 12:22 am
Re: Button array cdu
Could you please, post your script and a picture of your arduino wiring with description, in order to help further ?Shimokuta wrote: ↑Sat Feb 25, 2023 5:55 pm Thanks guys for the quick help
I did try a second button array on the same arduino; this did not work, so i was afraid there was a limit of a max per arduino.
So, i guess i made an error , in connecting or coding.
but good to hear there is no max per arduino, ok , only max is connections...
again thanks, i will go and try again from here
Re: Button array cdu
You can also use your own Arduino sketch.