Step counting only while on stairs

hello everyone, i am a new to arduino.
i am going to make a project using MPU6050 accelaration sensor to detect steps only while we are on stairs.
somebody help me giving idea related to programming so that I can adjust the accelaration & gyro data such a way that it will only count steps only on stairs.

Its urgent, Please help me

shaktisingha:
somebody help me giving idea related to programming

Doesn't work that way. The forum is waiting for evidence of some concrete effort on your part, in the form of a sketch, to see what help is needed.

shaktisingha:
Its urgent, Please help me

I hope you have warm clothing. It will feel like a cold rain when you realize how little the forum cares about this.

How to use this forum.

You make the code so it knows which way is up.

Gravity is 9.807 m/s/s straight down. Whatever you read while stationary pointed true up, save that as gravity.

Read more is accelerating up, read less is accelerating down.

Every level floor step has some up and down to it.

Your code has to make many reads per second to track how far up or down the device moves.
edit - or maybe you watch for a pattern associated with taking a step up or down.

Kudos for keeping it down to one dimension.