I have a script in Arduino that'll get a letter, and to make things as short a possible I'd like to use a string combined with another variable to get the variable name I need to fill in into the function.
I'd like this because I have a function mySwitch.send(Int, 24). For the first Int variable I need to to send a number that is dependent on the letter I sent, and on the current value of A_stat, I defined these values in variables A_aan, A_uit, B_aan, B_uit, etc.
For example for the letter A I need to fill in the variable A_aan if a_stat == 0. If a_stat == 1 it needs to fill in A_off.
For B I need to fill in the variable B_aan if b_stat == 0, and I need to fill in the variable name B_uit on the place of Int if b_stat == 1.