I am working on a mini flashlight project. I would like to avoid holes in the enclosure to ensure waterproof-ness so using a standard slide switch is not an option for me.
I want to use a version of this (a vibration sensor) that will latch in the "on" position (perhaps with the aid of a magnet or mechanical structure inside the sensor) when shaken and will turn off when the user shakes it again. I have done quite a bit of research and can't find anything like it. I might be missing something obvious that makes it impossible/expensive/unreliable. Thank you for your help.
EDIT: A comment to this question mentions a microcontroller. Are there any pre-made ones for my purpose? Surely it is a commonly required function.