I'm new to the Raspberry Pi and electronics and I have really been struggling getting any of my attempts at following Adafruit's electronic project guides to work. I am SSHing into my RasPi 2 from my MBP on my LAN.
Specs:
- OS: RASPBIAN JESSIE
- Hardware: Raspberry Pi 2, breadboard, buttons, wires, resistors, cobbler, Apple Earphones plugged into RPi2 3.5mm jack.
The code from the tutorial:
import os
from time import sleep
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(23, GPIO.IN)
GPIO.setup(24, GPIO.IN)
GPIO.setup(25, GPIO.IN)
while True:
if (GPIO.input(23) == False):
os.system('mpg123 -q binary-language-moisture-evaporators.mp3 &')
if (GPIO.input(24) == False):
os.system('mpg123 -q power-converters.mp3 &')
if (GPIO.input(25)== False):
os.system('mpg123 -q vader.mp3 &')
sleep(0.1);
But get the error message:
[jack.c:252] error: Failed to open jack client: 0x11
[jack.c:58] warning: FIXME: One needs to wait or write some silence here to prevent the last bits of audio to vanish out of the ringbuffer.
jack server is not running or cannot be started
jack server is not running or cannot be started
To troubleshoot, I found the following code as a suggestion and ran it:
pi@raspberrypi:~ $ amixer cget numid=3 1
numid=3,iface=MIXER,name='PCM Playback Route'
; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0
: values=1
The objective was to set the audio output to the 3.5mm jack. However, the error message above persists. Any ideas? Please let me know if you need more info.
Thanks.