Optical Encoder Button Problem

First time posting, please let me know if I miss anything.

Optical Encoder Datasheet
I am using a CTS series 291 optical encoder for a project, I have attached the datasheet above this. The exact model I am using is the 291P1022 FX24ABB. So far I have hooked it up to my arduino board and keep track of the position, but I am not able to get the push button to work. The push button is connected with 2 pins instead of one like the other encoders I have used and I can not figure out how to use it. Any help would be appreciated, thank you.

It's just the two sides of the switch.

Wire one to ground.
The other to your input pin.

const byte thePin = 3;    // switch on digital input 3

Be sure to

pinMode(thePin, INPUT_PULLUP);

When you press the button, digitalRead() will show LOW.


Oh - Welcome to the community!


Thank you so much for the help, that fixed the problem!

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