Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potentiometer and a reverse button #476

Open
valerivp opened this issue Mar 26, 2024 · 1 comment
Open

Potentiometer and a reverse button #476

valerivp opened this issue Mar 26, 2024 · 1 comment
Labels
question Further information is requested

Comments

@valerivp
Copy link

valerivp commented Mar 26, 2024

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 valerivp added the question Further information is requested label Mar 26, 2024
@EFeru
Copy link
Owner

EFeru commented Mar 27, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants