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

file attinyx16.py analog pins only for output? (the text of the definitions tells us) #133

Open
PaulskPt opened this issue Feb 6, 2024 · 0 comments

Comments

@PaulskPt
Copy link

PaulskPt commented Feb 6, 2024

I am using an Adafruit Gamepad QT (ID 5743).
While diving into this Adafruit_Circuitpython_seesaw module I found that the text in the file attinyx16.py,
lines 21-22 read:

    """The pins capable of analog output"""
    analog_pins = (0, 1, 2, 3, 4, 5, 14, 15, 16)

however, this file is also used for the Adafruit Gamepad QT (ID 5743).

The text in Adafruit Learn for the Gamepad QT
pinouts
says the following:

Joystick
This is the 2-axis joystick located on the left side of the board.

X-axis - The joystick x-axis (horizontal) is on pin 14 in the seesaw firmware.
Y-axis - The joystick y-axis (vertical) is on pin 15 in the seesaw firmware.

In test scripts these Joystick X-Y values are usually read using commands like this:

            x = 1023 - seesaw.analog_read(14)
            y = 1023 - seesaw.analog_read(15)

I suggest to change the text in file attynx16.py, lines 21-22, and have them read (for example) like:

    """The pins capable of analog input and output"""
    analog_pins = (0, 1, 2, 3, 4, 5, 14, 15, 16)

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

No branches or pull requests

1 participant