attiny tilt switch pwm

Well, for one thing, the end of your program shows effectively a while(forever) statement - once you get there it's stuck..

regards

Allan