ADS1115 Analog Sticks with uinput
-
@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!
-
@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.
-
@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>
? -
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 -
This post is deleted! -
@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...
-
@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 callablethis 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.
-
@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.
-
@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?
-
Sorry, no idea.
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.