How do I use the reverse function in APP ADC on Maxim or Pronto controllers?
The Maxim and Pronto controllers have the UART-pins shared with the hall sensor pins, so when using sensors the reverse and cruise control functions in the ADC app cannot be used at the same time as hall sensors or encoders. It is possible to use a simple lisp-script to simulate these functions with other pins depending on which pins you have available. The following example activates the reverse-button when the ACD2-input goes above 1V.
(app-adc-detach 2 1)
(loopwhile t {
(app-adc-override 2 (if (> (get-adc 1) 1.0) 1.0 0.0))
(sleep 0.01)
})
You can read more about those extensions here:
https://github.com/vedderb/bldc/blob/master/lispBM/README.md#app-adc-detach
https://github.com/vedderb/bldc/blob/master/lispBM/README.md#app-adc-override
