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

Joystick / ThumbPad support, where button can have both low and high values #44

Open
shafr opened this issue Apr 24, 2020 · 4 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@shafr
Copy link

shafr commented Apr 24, 2020

Hi, I was woundering how to use your library to work with joystick buttons. They have basically x2 10K resistors, so values from analog read goes something like this:

  • Left-Right/Top-Down:
Left Middle Right
0 1850-1900 4096
  • Joystick press:
Pressed Default
0 800-1300

I've tried both Pull_down and Pull_up for the corresponding pins, but values are the same.

Is there any way how I can define (ideally with interrupts) buttons that have both high and low values ? Or define max/min value ?

I'm using ESP32 DEV and Joystick Like this

Thank you.

@evert-arias
Copy link
Owner

Hi @shafr
At the moment the library does not support this type of control but you have definitely pointed out an interesting feature to be implemented.

We appreciate your feedback.

@evert-arias evert-arias added the enhancement New feature or request label Apr 29, 2020
@evert-arias evert-arias self-assigned this Apr 29, 2020
@shafr
Copy link
Author

shafr commented Apr 29, 2020

@evert-arias thanks for comment!

I've found something similar that is already implemented here. It has calibration (3.3v and 5v) value detection and implementation itself. (Beerware license)

Maybe there can be a class that is EasyJoystick instead that would extend EasyButton and would have:

  • triggered value and
  • default value range :) ?

@evert-arias
Copy link
Owner

Hi @shafr It looks good to me 👍. It is a feature that I will take into account to work on in the future.

@saikek
Copy link

saikek commented May 16, 2020

@evert-arias Awesome. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants