switch (analogRead (A0))
With 1024 cases? No, your code doesn't make sense. What are you trying to do?