3401 User Guide: Difference between revisions

From Phidgets Support
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOINDEX__
<metadesc>The HY554 USB to Audio adapter cable enables audio input and output for the Phidget SBC.</metadesc>
[[Category:UserGuide]]
[[Category:UserGuide]]
 
{{UserguideTOC|3401.jpg|3401}}
==Getting Started==
==Getting Started==
The USB to Audio adapter provides sound capabilities to the PhidgetSBC.  The audio adapter offers two integrated channels - one for speakers or headphones, and one for a microphone.  The Audio Adapter  plugs into any of the PhidgetSBC USB ports.  The USB to Audio Adapter is not a Phidget device and is not controlled using Phidgets APIs.   
The [{{SERVER}}/products.php?product_id=3401 3401 USB to Audio adapter] provides sound capabilities to the PhidgetSBC.  The audio adapter offers two integrated channels - one for speakers or headphones, and one for a microphone.  The Audio Adapter  plugs into any of the PhidgetSBC USB ports.  The USB to Audio Adapter is not a Phidget device and is not controlled using Phidgets APIs.   


Using this product requires a working knowledge of Linux.   
Using this product requires a working knowledge of Linux.   
Line 12: Line 14:
:'''PhidgetSBC (1070)<nowiki>:</nowiki>'''
:'''PhidgetSBC (1070)<nowiki>:</nowiki>'''
::Your SBC may be running an older version of firmware that does not support the USB Audio Adapter, requiring you to update your SBC firmware to the latest version - update to the full version.
::Your SBC may be running an older version of firmware that does not support the USB Audio Adapter, requiring you to update your SBC firmware to the latest version - update to the full version.
:'''PhidgetSBC2 (1072)<nowiki>:</nowiki>'''
:'''PhidgetSBC2 (1072) or PhidgetSBC3 (1073)<nowiki>:</nowiki>'''
::You must install libasound2, and optionally mpg123: apt-get install libasound2 mpg123 Make sure to set “Include full Debian Package Repository” to true on the System->Packages web interface page and save changes first, or the packages won’t be available.
::You must install libasound2, and optionally mpg123: apt-get install libasound2 mpg123 Make sure to set “Include full Debian Package Repository” to true on the System->Packages web interface page and save changes first, or the packages won’t be available.
2. Plug the Audio Adapter into an open USB port on the SBC. The SBC should automatically recognize the converter.
2. Plug the Audio Adapter into an open USB port on the SBC. The SBC should automatically recognize the converter.
Line 33: Line 35:
[[File:3401 0 Speakers.jpg|400px|link=]]
[[File:3401 0 Speakers.jpg|400px|link=]]


2. Included with the Phidget SBC is an mpeg audio playback program mpf123.  To play an mp3 file, simple type:
2. Included with the Phidget SBC is an mpeg audio playback program mpg123.  To play an mp3 file, simple type:
<div class="source">
<div class="source">
<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>

Latest revision as of 20:59, 8 May 2018


3401.jpg
Go to this device's product page


Getting Started

The 3401 USB to Audio adapter provides sound capabilities to the PhidgetSBC. The audio adapter offers two integrated channels - one for speakers or headphones, and one for a microphone. The Audio Adapter plugs into any of the PhidgetSBC USB ports. The USB to Audio Adapter is not a Phidget device and is not controlled using Phidgets APIs.

Using this product requires a working knowledge of Linux.

3401 0 Connecting The Hardware.jpg


Connect the Sound Adapter to the PhidgetSBC

1. Log onto the SBC via SSH.

PhidgetSBC (1070):
Your SBC may be running an older version of firmware that does not support the USB Audio Adapter, requiring you to update your SBC firmware to the latest version - update to the full version.
PhidgetSBC2 (1072) or PhidgetSBC3 (1073):
You must install libasound2, and optionally mpg123: apt-get install libasound2 mpg123 Make sure to set “Include full Debian Package Repository” to true on the System->Packages web interface page and save changes first, or the packages won’t be available.

2. Plug the Audio Adapter into an open USB port on the SBC. The SBC should automatically recognize the converter.

Type dmesg | tail –n 5 on the SBC to view the last 5 lines of the kernel’s message buffer. You should see something similar to the lines below (this is output from a PhidgetSBC2):

usb 1-1.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
usb 1-1.1: Product: USB Headphone Set
input: USB Headphone Set as /devices/platform/s3c2410-ohci/usb1/1-1/1-1.1/1-1.1:1.3/
input/input0
usbcore: registered new interface driver snd-usb-audio

This tells you that the USB to Audio adapter was properly recognized.

Playing an MP3 File

1. Plug a set of headphones, or computer speakers into the green jack on the back of the audio device.

3401 0 Speakers.jpg

2. Included with the Phidget SBC is an mpeg audio playback program mpg123. To play an mp3 file, simple type:

mpg123 –g 100 filename.mp3

This file can be located either in your home director, or on a USB storage device. The -g 100 option tells mpg123 to turn the gain on the audio device to 100%.

3. The program can also be used to play streaming audio. If you SBC is connected to the internet through your home network, you can type a command like:

mpg123 -g 100 -@ http://www.di.fm/mp3/club.pls.

The -@ option tells mpg123 that the file is actually a playlist, not a sound file.

4. Your SBC should start playing music from the radio stream.

Using a Microphone

3401 0 Mic.jpg

1. Plug a set of headphones, or computer speakers into the green jack on the back of the audio adapter.

2. Plug a microphone into the yellow jack on the back of the audio adapter.

3. You can test the input of the audio adapter by typing (1070 only):

cat /dev/audio > /dev/audio

The /dev/audio device can be used for both input, as well as playback. This command reads the input, and sends it right back to the output.

4. Speak into the microphone, you should be able to hear your voice on your headphones or speakers.