mholgatem / GPIOnext

The next evolution of GPioneer! Create virtual gamepads with your GPIO pins!
MIT License
134 stars 37 forks source link

GPIOnext and PWM audio #6

Closed julenvitoria closed 6 years ago

julenvitoria commented 6 years ago

Hi, I am building a GBZ with a Raspberry Pi zero w and after I install and configure GPIOnext the sound through PWM (PWM0 on GPIO #18 (ALT5) and PWM1 on GPIO #13 (ALT0)) don't work... before this it was working well. any suggestion?

Thanks!!

mholgatem commented 6 years ago

try running GPIOnext with the 'set pins' flag

copy and paste the following two lines into your command line:

gpionext set pins 3,5,7,11,13,15,19,21,23,29,31,35,37,8,10,16,18,22,24,26,32,36,38,40
gpionext reload

I left out pins 12 + 33 (GPIO_18 & GPIO_13 respectively). You may need to restart your system after running the commands to get audio working.

mholgatem commented 6 years ago

I'm going to close this issue. If you are still having problems, you can comment on here and I'll re-open the issue.

julenvitoria commented 6 years ago

First of all thank you for your answer. Right now I can not verify the solution you gave me. You can close this issue and when I verify that the sound through pwm is functional with GPIOnext I will let you know. Thank you very much!

julenvitoria commented 6 years ago

Hi! I just tried your suggestion but there is still some problem ... when I enter to the configuration menu the audio stops working and when I try to configure the controls the pin 33 (GPIO 13) is detected at the same time as the button that I push. Thanks

photo_2018-02-15_01-49-02

mholgatem commented 6 years ago

sorry, I thought that you already had the config set up. That command only affects the main GPIOnext, not the config. run the config like this:

sudo python3 /home/pi/GPIOnext/config_manager.py --pins 3,5,7,11,13,15,19,21,23,29,31,35,37,8,10,16,18,22,24,26,32,36,38,40

that should run the config and ignore the pins that you are using for pwm

julenvitoria commented 6 years ago

Hi, I did what you told me via putty but I get an error (unrecognized arguments). Could you tell me if I did it correctly? 8cbf1afb-5036-443d-a16b-d327fec8d704

mholgatem commented 6 years ago

I'm not sure what to tell you. I've tested every way that I can think of and can't replicate your problem. Have you tried just copying and pasting the command that I posted into putty?

julenvitoria commented 6 years ago

Hi, yes, I copied an pasted the command vía putty... next weekend I will try with another pi zero that I purchased. Should I see a confirmation message after I paste the command?

mholgatem commented 6 years ago

that is really strange. it won't be a confirmation message, but it will run the config

julenvitoria commented 6 years ago

Hello! I have good news! I tried to make the pin configuration again with the new raspberry and this time worked perfectly. Maybe the other raspberry has some kind of problem that I do not know, it has never shown symptoms of failure in any way. Once again thank you very much for everything!

mholgatem commented 6 years ago

cool. I'm glad that it's working because I was at a loss! Thanks for letting me know.