An ESP32-PICO-V3 powered ruler with an onboard accelerometer. It can be powered from both USB and a 1s LiPo battery using the dedicated connector. Suggested 1s 500mAh drone battery repurposed. The connector is a standard JST-XH 2 pins.
DISCLAIMER: This is a DIY project. DO IT AT YOUR OWN RISK! I am not responsible for any dead device, waste of money, your cat dying, You getting fired from work because your ESP32 based alarm failed OR your ruler causing a global total thermonuclear war.