Direction Detection

Yes I googled it
I am trying to undernstand it.

My experience with Arduino is not that good.

Basically I am a PLC programmer and somehow need to develop a logic with Arduino first time.

I just started learning Arduino a week before

Thats why I am asking very basic questions.

Thank you for your kind support