Accelerometer: An accelerometer sensor is a device utilized for measuring acceleration which can be static or continuous due to the force of gravity. It can also be defined as the…