Arduino Forum

Products => Arduino Yún => Topic started by: almax85 on Oct 04, 2018, 07:28 pm

Title: Sound mp3 with Arduino Yun
Post by: almax85 on Oct 04, 2018, 07:28 pm
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



Code: [Select]


#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);
  }
 
 
}



Title: Re: Sound mp3 with Arduino Yun
Post by: almax85 on Oct 05, 2018, 03:41 pm
Nobody can help me?
I have to update my yun to Openwrt??

Thank's
Title: Re: Sound mp3 with Arduino Yun
Post by: sonnyyu on Oct 05, 2018, 04:05 pm
Use search function of forum:

http://forum.arduino.cc/index.php?topic=242648.msg1744666#msg1744666 (http://forum.arduino.cc/index.php?topic=242648.msg1744666#msg1744666)


Title: Re: Sound mp3 with Arduino Yun
Post by: almax85 on Oct 05, 2018, 05:23 pm
Thank you.
When I try to install the package from ssh I get kernel error and can not install kmod-usb-audio and kmod-sound-core.

I repeat that I have linino software, maybe I should put openwrt?