Set_Accelerometer Function

Function for reading and setting accelerometer value with frequency
checking