margravegillian / arcade1up_powerandvolume

arcade1up power and volume
1 stars 0 forks source link

Mute/Unmute when starting volume script #1

Open asanab76 opened 3 years ago

asanab76 commented 3 years ago

Get the following when I attempt to start the volume script:

sudo python pivolume.py 96 Un-muted Muted Un-muted Muted Un-muted Muted Un-muted ^CTraceback (most recent call last): File "pivolume.py", line 53, in <module> time.sleep(0.5) KeyboardInterrupt

I have double checked the wires, and they are placed in the same spot as the example. This is on a TMNT cab.

margravegillian commented 3 years ago

On my system I removed the mute method as it wasn't working for me anymore. I believe an update broke that. it is not needed. I also had to change the alsaaudio.mixer to hdmi in the file on my machine after a pi update. I added a new file. pivolume_nomute.py Try and use that script. You may need to change alsa mixer depending on what you are using .

asanab76 commented 3 years ago

so the mute and umute no longer happens on the screen, but I still do not get the volume to function with the button. I did drop in t a python shell and used the setvolume method to adjust the volume up and down. I dont think my pins are being recognized, as when I volume up and down they do not register as a button press. Is there a step I have to do in the main configuration to enable them?

I get this in the output of the terminal:

100 pivolume.py:24: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings. GPIO.setup(vol_dn_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)

margravegillian commented 3 years ago

it sounds like your pin is wrong possibly. make sure the pins you are using in the script are the ones you are using to connect your volume wires to. possibly reverse the wires as well. i am not sure on your cab if it is the same as the marvel one i would assume it is. but it may not be. i did have to fiddle to get the right ones which i came up with on my config otherwise it did not work