Ben
Well-known member
Hi,
this is more a C++ question than a Teensie one. Is it possible to have an Encoder object as a private member of a class and specify the pins the encoder is connected to in the classes constructor?
The problem I see is there is no separate function in the Encoder lib to assign the pins. So I can't instantiate an Encoder object as a private member and then specify the Pins in the constructor.
I'm sorry I break the forum rule of posting code, but It's not that kind of problem where I have a code that should be working and it doesn't, it's more that I don't know how to tackle this problem with code at all
Ben
this is more a C++ question than a Teensie one. Is it possible to have an Encoder object as a private member of a class and specify the pins the encoder is connected to in the classes constructor?
The problem I see is there is no separate function in the Encoder lib to assign the pins. So I can't instantiate an Encoder object as a private member and then specify the Pins in the constructor.
I'm sorry I break the forum rule of posting code, but It's not that kind of problem where I have a code that should be working and it doesn't, it's more that I don't know how to tackle this problem with code at all
Ben