Deadman Buoy - hqwitty/UCSD-HPS-Electronics GitHub Wiki
The buoy is held down by the pilot for the entirety of the journey. The program is initialized when the button is first pressed. If the button is released the Arduino will start a five second countdown. If the button is not re-pressed within that five seconds, the electromagnet will turn off and release the buoy. The accounts for failures in the electronics systems because if there is a power failure the buoy will automatically be released.
The design was slightly adjusted to make it easier to hold by just grabbing the handle instead of pressing a button. This also allows for easier implementation of a hall-effect sensor which is used to detect the magnet, placed in the trigger on the handle, and sense when its squeezed or released.