Latching Button

A latching button or switch remains in its selected state until it is pressed again or manually moved back to its original position.

Many VESC Labs products use latching buttons or switches for power control. When the switch is turned on, the device remains powered until the switch is turned off again. This provides a simple and reliable method of controlling power without requiring the device to monitor button presses continuously.

Latching buttons and switches can also be used for other functions such as enabling reverse, selecting drive modes, enabling accessories, or switching between operating states. For these applications, a latching switch can often be connected to an ADC input using only two wires: the ADC signal and ground.

The VESC monitors the ADC voltage and can detect the position of the switch. To perform custom actions beyond the standard ADC functionality, a LispBM script must be written and configured within VESC Tool. This script can then trigger different actions depending on whether the switch is in the ON or OFF position.

Example

A latching power switch may be used to connect or disconnect power to a display, communication module, or other accessory. Alternatively, a latching switch connected to an ADC input could be configured to enable a high-performance drive mode when ON and an economy drive mode when OFF using a custom LispBM script.

In simple terms: a latching button or switch remains in its selected position until it is changed again.