const int numReadings = 50;`
You are indicating that increasing the number above 32 causes a failure?