Working timer interrupts and "safe" camera code