Encoder Library: Create encoder array object

I'm currently using the Encoder library and so far it has worked great, but while optimizing the code I can't seem to be able to create an array of Encoders. The documentation and the github mention nothing about this and every syntax I try throws out an error.

If anyone familiar with this library knows how to get this done or knows of any other encoder library that allows this, please let me know.

#include <Encoder.h>
Encoder encoderArray[] = {
  {2, 3},
  {4, 5},
  {6, 7}
};
const size_t numEncoders = sizeof(encoderArray) / sizeof(encoderArray[0]);

This was it. Thankyou @gfvalvo !!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.