Fix Raspberry Pi Zero Sound Not Working - GPIONext pin clash!

  Рет қаралды 3,315

Bytes N Bits

Bytes N Bits

Күн бұрын

I've been building up a Raspberry Pi Zero handheld games console. But when adding the sound circuits the system would crash every time it tried to play a sound. Testing each part individually worked, but when put together the console would not run.
It turned out that the software I was using to implement the GPIO game controller (GPIONext) was clashing with the audio functions on the GPIO header.
The solution was to restrict the GPIONext code to only tamper with the pins used for the controller and to leave the rest alone!
GPIONext commands
Run the config utility with restricted pins :-
sudo python3 /home/pi/GPIOnext/config_manager.py --pins 3,5,7,8,10,11,13,15,29,31,32,33
Restrict the driver daemon to the controller pins :-
gpionext set pins 3,5,7,8,10,11,13,15,29,31,32,33
gpionext reload
Make sure you check out my project pages at
bytesnbits.co....

Пікірлер: 25
@cheat_steve10
@cheat_steve10 Жыл бұрын
Thanks for the video, had a problem with my diy handheld with the fbcp ili9341 driver and gpionext. If using both there was a huge amount of stuttering, but now it's completely gone. Mostly likely a clash between the two drivers
@BytesNBits
@BytesNBits Жыл бұрын
Great to hear you got it working.
@cheat_steve10
@cheat_steve10 Жыл бұрын
@@BytesNBits thx even made a video in my channel about it. Thanks again
@alanrobinson6661
@alanrobinson6661 3 жыл бұрын
Thanks, this saved me a real headache !
@BytesNBits
@BytesNBits 3 жыл бұрын
Great to hear. Hope the project goes well.
@andersonand3720
@andersonand3720 10 ай бұрын
Explica muito bem !
@BytesNBits
@BytesNBits 10 ай бұрын
Obrigado. Espero que você faça o seu trabalho.
@meray6811
@meray6811 2 жыл бұрын
THANK UUUUUUU!
@BytesNBits
@BytesNBits 2 жыл бұрын
No problem. I hope it helped.
@Vincent_Serpico
@Vincent_Serpico Жыл бұрын
Thanks for these videos, they have been helpful. However, I just wanted to share with you an issue I had with the GPIONext and Sound. Just like you said in this video, my sound would not work as soon as the GpioNext would run. I tried to isolate the pins like you had directed, but found that after doing this if I had the sound circuit plugged in the gpiopins would not recognize the game pad. I ended up taking the sound pins out of the Alt 5 state and found that the sound now worked as well as the gamepad. Not sure why this is the case, but thought I'd get your opinion. I'm making a handheld Atari2600 game system for fun. I have found that the sound works well if the game only has sound effects for actions, however if a background sound/music is playing it tends to skip or echo. Any suggestions to fix? Thanks
@BytesNBits
@BytesNBits Жыл бұрын
That's a strange one. You should be able to set the alt 5 state for just the pins you need so it shouldn't affect the other connections. I'll have to admit that I haven't looked at this for a couple of years so haven't got any insight into the issue. I'd check that you're only setting the alternate state on the sound pins you're using and that the rest of the inputs are all still acting as inputs. The gpio readall command from wiringpi should let you see their states.
@Vincent_Serpico
@Vincent_Serpico Жыл бұрын
@@BytesNBits Thanks for the info, for now I have it working, still trying to figure out why the sound channels tends to fight with each other. I am using an old version of the stella emulator so that I can incorporate a rotary encoder as a atari paddle for certain games. The newer versions do not allow that type of input. Thanks again!
@nightrider8496
@nightrider8496 Жыл бұрын
Can you pls show how you build an connected the gamepad with the pi?
@BytesNBits
@BytesNBits Жыл бұрын
Hi. The gamepad is just a set of switches with each one connected to a digital input on the Pi.
@Ryan-cx2fn
@Ryan-cx2fn Ай бұрын
when I set the pins for the controller like you showed I didnt have a problem with sound. but the frame rate of my lcd dropped drastically where is does like a slide to side load as opposed to being a smooth transition like it once was and also a response lag as well. any idea of what could be the issue. I am using the same tft screen like you have just a 2.2in
@BytesNBits
@BytesNBits Ай бұрын
If you disable the gpionext driver does the screen get better? Make sure gpionext is not messing with any of the LCD pins.
@Ryan-cx2fn
@Ryan-cx2fn Ай бұрын
It seems when i download the driver it’s still fine.but when i go in to add what pin does what and reboot the frame rate drops. I also tried doing the GPIO set pin option and when I do that and go into retropie to do the controller layout only one to two pins work then. And frame rate stays dropped
@IvanKanevskyi
@IvanKanevskyi 4 ай бұрын
I am having a massive problem with sound output, I am not even using buttons or screen. Using MAX98357 amp and tried multiple speakers, but none seems to work :( I have been trying to solve it for weeks and asked my EE friends. I was wondering if you know what could be an issue?
@BytesNBits
@BytesNBits 4 ай бұрын
Have a look at my I2S video here - kzbin.info/www/bejne/bXO7gGyLm7mZj6s.
@studioeight4571
@studioeight4571 2 жыл бұрын
I've been using your tutorials to get through some issues, and they've been really helpful. But I'm still getting problems once I get to using GPIOnext. When I start the screen up it may or may not work, but if it does, certain button presses eventually cause it to go off. I'm getting DMA errors, regarding Tx and Rx using channel 1 and 7, I've tried moving Tx and Rx to other channels, but still the same thing happens. Any ideas?
@BytesNBits
@BytesNBits 2 жыл бұрын
Hi. In this video I cover restricting GPIONext to only using a specified set of GPIO pins. Have you done that in your code? I had a similar issue with my sound pins being scanned by the GPIONext code. Can you get the screen working without the controller and can you get the controller working without the screen? If so it looks like it's definitely some sort of clash between the two. Try restricting the GPIONext controller to a single button to see if that works, then add more buttons in until you find one that causes the issue. This might give more insight into the problem. I hope this helps.
@studioeight4571
@studioeight4571 2 жыл бұрын
Yeah I'd restricted the GPIOnext to only the pins it's using. I'll try the single pin at a time thing, see if I can sus it out. Thanks for the suggestion!
@studioeight4571
@studioeight4571 2 жыл бұрын
Update: Noticed that my screens RS and RESET pins were different to yours, and that meant some buttons were elsewhere too. Moved them over to the same pins you used, and no more conflicts! Can only assume that wherever my buttons had ended up was causing the conflict, maybe due to a pins alternate function?
@umutkayacan7659
@umutkayacan7659 3 жыл бұрын
What is going to be the name of the console? I thought of "Bytes boy"😄
@BytesNBits
@BytesNBits 3 жыл бұрын
To be honest I hadn't given it any thought! BytesBoy sounds great. Any more suggestions?
Apple Watch Series 10 VS Ultra 2 - DON'T BE FOOLED!
11:41
GregsGadgets
Рет қаралды 166 М.
Whoa
01:00
Justin Flom
Рет қаралды 58 МЛН
Фейковый воришка 😂
00:51
КАРЕНА МАКАРЕНА
Рет қаралды 6 МЛН
Sigma Girl Pizza #funny #memes #comedy
00:14
CRAZY GREAPA
Рет қаралды 3,2 МЛН
Emulation on your modded XBox 360 - play retro console games
21:56
Bytes N Bits
Рет қаралды 4,1 М.
How I Beat The Password Game
39:53
Bog
Рет қаралды 44 М.
#2 - Getting Started With the Free Robo Eyes Arduino Library
6:46
Raspberry PI Zero +ILI9341
4:42
FBELLSAN - Informatica
Рет қаралды 224
Connect Your ESP32 to Alexa with FauxmoESP
28:28
Bytes N Bits
Рет қаралды 2 М.
Researchers discover a very simple way to make batteries last 70% longer
6:47
Hack your Nintendo DSi in 2024 and play all the games
32:47
Bytes N Bits
Рет қаралды 16 М.
This MacBook was really really really really dirty #413
36:27
Adamant IT
Рет қаралды 11 М.
The Apple Watch Ultra "2" | It's Black...
11:57
Brandon Talbot
Рет қаралды 15 М.
Whoa
01:00
Justin Flom
Рет қаралды 58 МЛН