Motor dc sensor

Hello everyone, i have this dc motor it has a sensor on it seems to be a hall sensor but i m not sure .

Also has four cables red white green yellow
I think

Yellow signal a
white signal b
Red 5v
Green gnd

Ir any know this sensor and how to connect to arduino uno please help me


It's an encoder. Use the encoder library. At least one of the signal wires should be connected to a hardware interrupt pin. This is pin 2 or 3 on an UNO. Use both 2 and 3, if you can.

Thank you for you reply! I have another question i´m conecting my motor with this shield

My question is if i can solder a cable on top to connect digital 2 and 3 to use the encoder.

Thank you.

Yes you can but that's not how I would do it.

I would do it by adding a proto-shield to the stack and putting a connector on that shield which has all the encoder wires on one plug.