I built a simple distance sensor box for a bigger project. It measures distance with an ultrasonic sensor and sends it to another Arduino via RF. All of that works fine, however I thought it would be neat to have the measured distance output to a 7-segment-display so I connected that too. Due to the nature of SevSeg.h's refreshDisplay(), I can't use any delays in the main loop, however my sensor does need delays to properly measure the distance. Is there a way to get the seven segment display to display the measured distance properly? Right now it flickers once I activate all the delays and works fine when they're off, however the sensor stops working.
It's hard to believe that 12 microseconds of delays (two microseconds of which are unnecessary) is causing your problem - more likely "pulseIn".
Try the NewPing library.
Thanks for the suggestion, NewPing looks much more elegant than my solution. I've implemented it but the refresh rate is still too low for refreshDisplay(). I commented out line for line and it seems that just the vw_send command is enough to have it flicker too much to make out any numbers.