Posted on

Raspberry Pi: Test Sound Output

If you’re wondering how to test the left and right audio channel of your Raspberry Pi whether using an external USB sound device or the builtin audio you’ve come to the right place.

Connect to your Raspberry Pi via SSH or open the Terminal application. The simplest way to test the sound is to use the speaker-test command. Enter the following to test sound from your default configured audio device.

You should hear an alternating sound coming from your left and right speakers.

If you’re using a USB sound device you first need to check its device id/number.

Enter:

Output:

Then use speaker-test -c2 -twav -l7 -D plughw:N,0 replacing N with the number before snd_usb_audio. Like this:

Output should the same as the picture above and alternating sound from left and right audio from your speakers.

Using omxplayer to test mp3 or wav sound file

The above command will auto-detect or use any default configured audio device. Otherwise, if you want to test your USB Sound device enter the following command with 1 as the device number:

 

 

Posted on

DPI Adapter + Game Boy Controller = AIO

I finally had time to populate and test my DPI adapter prototype which will be included as part of my all-in-one board for Game Boy Zero / 3. So far it’s working fine. The DPI screen looks way better than composite.

I actually built a Game Boy 3 using just a simple FPC breakout board for doing the DPI connections but it was very difficult to make it work. Obviously because of all the wires I soldered to the Pi which are prone to interference. But I managed to make it work anyway. So I made a prototype to make it easier to use a DPI screen.

The AIO board will be compatible with Raspberry Pi Zero and Pi 3. Both will have sdcard access from the “CONTRAST” area of the Game Boy case.

Posted on

RetroPie: Testing The USB Controller/Joystick Via The Command Line or Terminal

Let’s start by connecting to your Raspberry Pi/RetroPie either by SSH or just plug a keyboard and hit F4 to go directly to the Terminal.

Check if your USB controller is detected by:

lsusb

Mine is “Arduino SA Leonardo”.

Next, enter the following command to test the inputs:

jstest /dev/input/js0

Now press each of the configured button inputs and you should get a response.

Posted on

Wiring Guide for Game Boy Controller v1.1

The pwm audio on the Pi Zero is horrible and noisy so you probably be needing a low/high pass filter too.

For the controllers, you can visit GPIO Button Guide for Game Boy Controller v2.0 / v2.1.

Additional Parts You May Need:

Posted on

GPIO Button Guide for Game Boy Controller v2.0 / v1.1

Wiring the Game Boy Controller v2.0 to the Pi Zero or Pi 3’s GPIO pins is the simplest way to configure controller inputs for the Game Boy Zero/3 without any additional component. You can use the following diagram to solder the button inputs to the Pi and download a copy of RetroPie with the GPIO program already pre-installed.

Posted on

Game Boy Controller V2.0 Audio Wiring Guide

Stereo Audio with Single Speaker Setup

This setup uses both left and audio channel.

  1. Solder a wire from the PWM0-R pad to the Pi Zero’s GPIO18 pin or the Pi 3’s right audio from the headphone jack.
  2. Solder a wire from the PWM1-L pad to the Pi Zero’s GPIO13 pin or the Pi 3’s left audio from the headphone jack.
  3. Solder the volume pot to the board with their respective pins. You can use a 5-pin or a 3-pin volume wheel.
  4. Solder a wire from the S_R+ pad to the speaker’s positive(+) pin.
  5. Solder a wire from the S_R- pad to the speaker’s negative(-) pin.
  6. Last step is to combine both left and audio for the speaker by soldering a jumper wire from S_R+ pad to S_L+ pad.
  7. For Pi Zero build, edit the /boot/config.txt and add the following line:
    dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4

You can also use 2 speakers for left and audio output if that’s what you want.

There are different ways to setup the audio on a Game Boy Zero/3 but this is the most common and easiest way to do so good luck and happy building!