Hello everyone. I can not make the audio work from my yun. I followed this code, well known on the net, only that no sound comes out to me. I bought a Manhattan usb sound card to which I connected headphones but when I press the button the audio does not start. Did I skip a few passes? maybe I have to install some package type kmod-usb-audio etc. etc.? Use Yun with Linino software
Thanks for your help
#include <Process.h>
const int buttonPin = 9;
const int ledPin = 13;
int buttonState = 0;
Process p;
void setup() {
Bridge.begin();
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT);
Serial.begin(57600);
}
void loop(){
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
digitalWrite(ledPin, HIGH);
p.runShellCommand("madplay /mnt/sda1/ItCouldWork.mp3");
while(p.running());
Serial.println("it works!");
}
else {
digitalWrite(ledPin, LOW);
}
}