Accelerometer changes reading alone!

I can't make much sense out of your description of the problem or your code. You should make sure that you understand how the accelerometer works, using the simplest possible program, before moving on to more complicated tasks.

For example, what do you think the value "5" means in the following line? Hint: it is not degrees rotation.

if(digitalRead(switchPin1)==1 && analogRead(0) > 5 )