Improved the movement detection algorithm

A project log for Morpheus - Smart sleep mask

I'm too excited to sleep at night and too groggy to wake up in the early morning. Morpheus will wake/sleep you with specific lights & sounds

Bhavesh KakwaniBhavesh Kakwani 10/25/2021 at 22:200 Comments

Took things into my own hands and implemented movement detection from scratch using raw accelerometer data. Algorithm is based on calculating absolute "jerk" (derivative of acceleration) and recording it if it goes over a dead-band/threshold. Tried it on myself last night and results are much better! Can actually see patterns of tossing/turning vs still sleep in the graphs.