How to wait until a callback function has completed

As long as you’re calling delay() outside the sketch’s “Animation” Thread it’s alright.