You should not create two of the same threads. Instead just edit the first one.
Anyway, back to the issue.
First off, you need a treshhold for your accelerometer. The reason for this is that the accslerometer is extremely sensitive and its humanly bot possible to hold your device so still Tgat the meter doesnt register a movement. So i stead of saying IF (y of .. < 0), try a small number such as 0.5. Or you can firat print the Y of accelorometer to the log to see what number would fit best.
As for the animations, you are restarting the animation each frame that your statement is true, meaning you will never get the change to see another frame but the first one. Check if the animations isnt already playing before switching to it.
Good luck!