#define NUM_ELEMENTS(_ArrayName) (sizeof(_ArrayName) / sizeof(_ArrayName[0])) const int Nmotor = NUM_ELEMENTS(motors);