revised flash timing code, added low battery warning

several changes to both app and firmware. this app is not backwards
compatible with old firmware.