Hi,
void aFunction(char aValue){
switch (aValue) {
case 'A': {
//Your code
break;
}
case 'B': {
//Your code
break;
}
}
}
void setup() {
aFunction('A'); //this will be called once before the loop
}
void loop() {
aFunction('A'); //this will be called on every loop
}
Jacques