RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    ADS1115 Analog Sticks with uinput

    Scheduled Pinned Locked Moved Help and Support
    helpads1115uinputcontrollersraspberry pi 3b
    17 Posts 2 Posters 2.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      obmai89 @mitu
      last edited by

      @mitu Alright, I'll just connect it to the middle i2c pins. Dude thank you so so so much for actually answering my post, this is what I was looking for and this is basically the last step to finishing my project. THANK YOU!

      O 1 Reply Last reply Reply Quote 0
      • O
        obmai89 @mitu
        last edited by

        @mitu Hey again, I followed all instructions and ran the script. When running it I get the error: ModuleNotFoundError: No module named 'uinput'

        This shouldn't happen, as I did pip3 install python-uinput just like the github page said.

        mituM 1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator @obmai89
          last edited by

          @obmai89 said in ADS1115 Analog Sticks with uinput:

          When running it I get the error: ModuleNotFoundError: No module named 'uinput'

          Are you running the script with python3 <scriptname> ?

          O 2 Replies Last reply Reply Quote 0
          • O
            obmai89 @obmai89
            last edited by obmai89

            I ran it on python3 i got the uinput error, then i ran it on python. The uinput error is now gone but I get this:
            Traceback (most recent call last):
            File "gpio_js_driver_super_game_pi.py", line 21, in <module>
            adc = ADS1x15(i2c=ADS1115)
            TypeError: 'module' object is not callable

            1 Reply Last reply Reply Quote 0
            • O
              obmai89 @mitu
              last edited by

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • O
                obmai89 @mitu
                last edited by

                @mitu Ah sorry mate, I am new to this forum and I keep on sending messages before finishing them up, hence the reason for the edit and the deleted message... I wanted to say now I got another module missing error on python3, I will fix it first then Ill come back if I hit a roadblock...

                O 1 Reply Last reply Reply Quote 0
                • O
                  obmai89 @obmai89
                  last edited by obmai89

                  @mitu Here I am again, after managing to remove all module not found errors (for now) I get this new one:

                  Traceback (most recent call last):
                  File "gpio_js_driver_super_game_pi.py", line 21, in <module>
                  adc = ADS1x15(ic=ADS1115)
                  TypeError: 'module' object is not callable

                  this is what I get after doing sudo python3 <script>.

                  edit: Apologies for the messy convo so far, as I said I am new to this forums and still getting the hang of it :). Hope I didn't give a bad impression.

                  mituM 1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @obmai89
                    last edited by

                    @obmai89 Not sure where the error comes from - but didn't you already have code that was working already ? Replace the analog sticks handling in the sample script I linked with your code and re-use just the button part for emitting gamepad button events.

                    O 1 Reply Last reply Reply Quote 0
                    • O
                      obmai89 @mitu
                      last edited by

                      @mitu Hey, I managed to fix it. I do get another issue now though,
                      AttributeError: 'ADS1115' object has no attribute 'readADCSingleEnded'

                      Got any ideas how to fix it?

                      1 Reply Last reply Reply Quote 0
                      • mituM
                        mitu Global Moderator
                        last edited by

                        Sorry, no idea.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                        Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.