0

Using rotary encoders with Joystick library
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Using rotary encoders with Joystick library

by Enialis on Sun Jan 10, 2021 6:49 am

What do I need to know in order to setup rotary encoders to work as input with the arduino joystick library? I can find very little information of rotary encoders at all other than wiring diagrams, even though I've seen several projects using them for USB input with no code examples.

Enialis
 
Posts: 1
Joined: Sun Jan 10, 2021 5:42 am

Re: Using rotary encoders with Joystick library

by adafruit_support_bill on Sun Jan 10, 2021 7:01 am

Unfortunately, the documentation on the arduino joystick library has zero useful information about how to use it. https://github.com/gmarty2000-ARDUINO/arduino-JOYSTICK
Looking at the code it appears to be designed to work with analog joysticks and simply prints out the x/y values.

Reading rotary encoders is a little more involved. PJRC has an excellent rotary encoder library here: https://www.pjrc.com/teensy/td_libs_Encoder.html

adafruit_support_bill
 
Posts: 80363
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.