Final duino code? added prev_frameoffset functionality