I'm trying to make a use of a relay module, I want a clear way to configure and control my relay module I've defined the struct and filled it with some info about id, pin number, title, and relay state I can't loop with for in the array of controls, because I can't get the sizeof the array right
typedef struct{
int id;
int pin;
String title;
bool state;
} SwitchControl;
SwitchControl controls[2] = {
{1, 22, "Switch 01", 1},
{2, 23, "Switch 02", 0},
};
for(int i=0; i<sizeof(controls) - 1; i++){
}
thanks