hey,
I am new here and I hope this is the right place for my problem.
MY SKETCH IDEA:
I just want if you click on the mini-ir-controller, that my own created sound-sample is "hearable".
For this first, i created a normal sketch for a mini-sound with a run of 3 seconds, which works.
But if I want combine this with an IR-controller system, it doesnt work(no sound by clicking) because the CODE isn right. So, I want to ask, if someone can help me? by the way, here is the code, but i can´t find the problem.
#include <IRremote.h>
#include <PCM.h>
const unsigned char sample[] PROGMEM = {
NUMBERS OF MY SOUND-SAMPLE
};
int RECV_PIN = 10;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
startPlayback(sample, sizeof(sample));
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
delay(100);
}
IR_Audio.ino (80 KB)