I build a magic wand.
A tilt sensor (SW520D) is connected to an ESP-01. A led indicates if there is a connection to my router.
When the connection is made and the "magic wand" is tilted a command is send to my home automation system (Domoticz) and a lamp is set on.
Small fun project to amaze neighbours and kids.
Full source code, 3D print STL files (for battery enclosure) and schematics on my web-log:
http://lucstechblog.blogspot.com/2020/1 ... -wand.html
Have fun.
Luc