I'm working on a lighting project for Christmas gifts where I have a Nano driving a bunch of LEDs (via TLC5940's), and I want the patterns being generated on the LEDs to respond to people in the proximity via an ultrasonic range finder (such as http://www.arduino.cc/en/Tutorial/Ping, the one I'm using isn't a ping but has almost the same code to drive it).
The problem I'm having is that the code to use the range finder and read the result injects enough of a delay to interfere with the LED animations. Do folks have any ideas on how to make the range finding be a non-blocking operation?