I wrote some test code for a Flora to light up varying numbers of pixels on a NeoPixel ring. The code works, but the pixels flicker. Is there an optimum refresh rate that minimizes flicker and still has reasonable response time?
In general, you want a refresh rate close to 50Hz. Below 50Hz you can start to see flicker. Above 50Hz you don't see much change, so you need some other reason to justify a higher refresh rate.
The code turns on a number of LEDs, then waits a bit, turns them off and repeats with a possible change in the number of LEDs to be turned on. The code you suggested doesn't do that. Also, with no delay between turning them on and off the pixels are erratic. I could hold off turning them off if value of val has not changed since the last iteration, but I didn't think I needed to do that.
More importantly, what do I do about not being able to program my Gemmas? It's very frustrating to be just sitting on these things and not being able to use them. See http://forums.adafruit.com/viewtopic.php?f=24&t=47838