use a pressure switch in the brake line or a switch on the pedal arm

MM64