Rotary encoders Pin out on grey code units

hello can some one help rotary encoders on ebay for arduino use
been building a unit that has a grey code encoder required the information on the net is baffling me
it has 5 pins the same layout as a ky040 encoder this is an incremental one [2 pin side switch 3 pin side encoder out] recently used this ky040 model works a [dds signal generator for HF] this works OK
the centre pin of three on this ky model is connected to ground OK

Is the centre pin on the grey code model ground also ??

please i don’t want to sound stupid but not used encoders much purely a hobbyist here

if some one could point me in the correct direction much appreciated

Links for both ?

thanks for response i am unsure wether to add volts positive ??? to the grey unit ?

sorry this is the code i have modified the code for 20x4 display on i2c and added swr meter on lines 2-3 not posted code yet as still working on prototype it verifies ok so in build mode the unit is on KD1JV web page

http://kd1jv.qrpradio.com/arduino/Arduino_tuner_aid.htm

i wont post code its very long but its on his site ok

It's Gray code, after Frank Gray....

that is very helpful "frank grey inventor" but how is this connected to wiring the encoder ??? question does it require positive voltage to work or not

You evidently need to understand what a "pull-up" is.

The ATmegas (and many or most other microcontrollers) provide internal pull-up functions (generally by a FET rather than an actual resistor) which can be enabled by the INPUT_PULLUP mode in pinMode. So (all) the common switch connections connect to ground.

Is there a "grey zone" ?

thanks for the time but consider the post closed NO FIRM ANSWER GIVEN reason for closure

steve73:
i am unsure wether to add volts positive ??? to the grey unit ?

The circuit designer does not.
In his sketch, these lines -

pinMode(enclk, INPUT_PULLUP); 
pinMode(endata, INPUT_PULLUP);

make it so that that's not necessary.
Sometimes you have to tell people around here when to shove off.

steve73:
thanks for the time but consider the post closed NO FIRM ANSWER GIVEN reason for closure

Did you not read my reply #6?

RP thanks for the explanation so power is not required separately it is derived from A0 A1 that’s fine will test and let you know the outcome unfortunately i am an old fart 60 never learned programming was not born with that skill 30 years as an mechanical engineer i find the best way for me to learn a skill is by doing a project so thanks again