Help with lattepanda

Hi.
I need help with playing a soud file like mp3 with the lattepanda that has a inbuild arduino leonardo. Her a like http://www.lattepanda.com/products/3.html

So what i need is when i press a key on my keyboard it plays a soud file untile i remove my figer.

When i press "N" on my keyboard it would play the soud file and keep looping thro the soud file if it runs out of time. When i remove my figer from the "N" button from my keyboard it stops the soud file from playing

Thanks in advance

Hello.

What have you tried? What happened? How is this different from what you expected? What specifically do you need help with?

Please post your best attempt at this, having regard to the forum instructions.

Thank you.

So this is what i have right now for controlling “N” button. I have not tried to implement what i want because i don’t know how to do it really. What i need is checking for a file on the os and taking the soud file from it. Play it when I press the button “N” and keep playing it. When i remove my finger/relase the button it well stop.

#include <Keyboard.h>


void setup() {
  pinMode(2, INPUT_PULLUP);
  // initialize control over the keyboard:
  Keyboard.begin();
}


void loop() {
  while (digitalRead(2) == LOW) {
    Serial.print("Pressing n");
    Keyboard.press('n');
  }
  delay(600);
  Keyboard.releaseAll();
}

If you have a latte panda use the pc part to do your task, it has a lot more power than the Arduino bit . Just use the Arduino bit to handle any I/O and pass that information to the PC part using the internal coms connection.

If you have a keyboard connected , then that connects to the PC part , so you can just run a windows media player on that .

There is a lot of stuff on the latte forum , I’d check that too.