Time capsule: an autonomous sensor and recorder based on diffusion-reaction.