hoverboard-firmware-hack-FOC icon indicating copy to clipboard operation
hoverboard-firmware-hack-FOC copied to clipboard

Potentiometer and a reverse button

Open valerivp opened this issue 11 months ago • 1 comments

Variant

ADC

Control type

None

Control mode

None

Description

How to make a potentiometer on one channel and a reverse button on the second channel? The button is a two-position switch

valerivp avatar Mar 26 '24 06:03 valerivp

Connect the reverse switch to the 2nd channel (one pin at 3.3v and the other pin connected to channel 2 and a pull down resistor). Then there are 2 solutions:

  1. Update the code to detect when the switch is on or off. Flip the sign of the 1st channel based on the switch value. Don't forget to disable/remove the other functionality for the 2nd channel (like the steering mix)

  2. Use Variant Hovercar, and turn the switch twice on and off quickly. The throttle Channel will be reversed. Turn the switch twice on off and it will reverse back. (You can use a pulse button, instead of a toggle switch)

EFeru avatar Mar 27 '24 20:03 EFeru