Efficient way of entering pin assignments for MEGA 2560

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Post Reply
Message
Author
toneill
Posts: 58
Joined: Tue Dec 03, 2019 5:46 pm

Efficient way of entering pin assignments for MEGA 2560

#1 Post 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

User avatar
Ralph
Posts: 7842
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Efficient way of entering pin assignments for MEGA 2560

#2 Post 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.

toneill
Posts: 58
Joined: Tue Dec 03, 2019 5:46 pm

Re: Efficient way of entering pin assignments for MEGA 2560

#3 Post by toneill »

OK Thanks Ralph .

toneill
Posts: 58
Joined: Tue Dec 03, 2019 5:46 pm

Re: Efficient way of entering pin assignments for MEGA 2560

#4 Post 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

User avatar
jph
Posts: 2832
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Efficient way of entering pin assignments for MEGA 2560

#5 Post 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.
Joe. CISSP, MSc.

toneill
Posts: 58
Joined: Tue Dec 03, 2019 5:46 pm

Re: Efficient way of entering pin assignments for MEGA 2560

#6 Post by toneill »

perfect thank you

Post Reply