Page 1 of 1

Efficient way of entering pin assignments for MEGA 2560

Posted: Sun Sep 10, 2023 7:07 pm
by toneill
I have a hardware panel comprising numerous switches and buttons and a few LEDs. This instrument uses an Arduino Mega 2560 microprocessor. As you know, there are a lot of pins available on this microprocessor. I have added the approx 60 or so pin assignments specifying the MEGA and the channel for each hardware component using the 'create/edit' tab in Air Manager. It works as expected.

Next I have created a few other hardware instruments and added them to my panel. Although, the individual instruments worked correctly in Create/Edit I see that in the panel they do not. You have to specify the microprocessor, channel and pin assignments again.

My question is 'Is there a better way of doing this or do I need to set up each switch again and then the instruments and panel works as expected.

Thanks for your help.

cheers
Ted

Re: Efficient way of entering pin assignments for MEGA 2560

Posted: Mon Sep 11, 2023 4:38 am
by Ralph
The Create/edit tab is just made for creating and testing scripts, not for running them as a 'live environment', that's supposed to be done from the Home tab.
There's no way to copy your configuration from Create/Edit to Home, sorry.

Re: Efficient way of entering pin assignments for MEGA 2560

Posted: Mon Sep 11, 2023 4:29 pm
by toneill
OK Thanks Ralph .

Re: Efficient way of entering pin assignments for MEGA 2560

Posted: Mon Sep 11, 2023 6:22 pm
by toneill
I notice that I can still use the old way of specifying the arduino and pin assignments, for example

Code: Select all

hw_switch_add ("ARDUINO_UNO_F_D8", D8_pressed)
I created this instrument (hardware) in Create/Edit, stopped and then tried it in Home. It appears to work ok and I did not have to transfer all the pin settings over. Since this is a hardware instrument only for me and I am not expecting to change any pin assignments, I think this should work for me.

Ted

Re: Efficient way of entering pin assignments for MEGA 2560

Posted: Tue Sep 12, 2023 9:14 am
by jph
toneill wrote: Mon Sep 11, 2023 6:22 pm I notice that I can still use the old way of specifying the arduino and pin assignments, for example

Code: Select all

hw_switch_add ("ARDUINO_UNO_F_D8", D8_pressed)
I created this instrument (hardware) in Create/Edit, stopped and then tried it in Home. It appears to work ok and I did not have to transfer all the pin settings over. Since this is a hardware instrument only for me and I am not expecting to change any pin assignments, I think this should work for me.

Ted
Hi Ted
that is exactly how most do it. It is far more logical when for your own use.

Re: Efficient way of entering pin assignments for MEGA 2560

Posted: Thu Sep 14, 2023 4:20 pm
by toneill
perfect thank you