*/#include <SPI.h> //Enable use of SD library#include <SD.h> //Read MicroSD card#include <TMRpcm.h> //Play music from MicroSD card//This value is assumed by the TMRpcm library, so I don't recommend altering it!const int SD_ChipSelectPin = 4;//Plug the speaker's red (non-GND) wire into this pin on the Arduino//TMRpcm assumes this is 9 on Arduino, so I don't recommend altering it!const int speakerP = 9;//File name of the WAV audio file loaded on the MicroSD card//Remember to include the file extension (should be .WAV)const String audioFileTitle = "music.wav";//Create TMRpcm objectTMRpcm tmrpcm;void setup(){ tmrpcm.speakerPin = speakerP; Serial.begin(9600); if (!SD.begin(SD_ChipSelectPin)) { // see if the card is present and can be initialized: Serial.println("SD fail"); return; // don't do anything more if not } //Need to convert String variable to char*, per TMRpcm documentation char charBuf[audioFileTitle.length()+1]; audioFileTitle.toCharArray(charBuf, 50); //Play the test sound //This sound file will play each time the Arduino powers up or is reset tmrpcm.play(charBuf); //Report to the user Serial.println("Sound file played!"); }void loop(){ tmrpcm.play("test.wav");//delay(5000);}
IR_Decoder.decode(); Serial.print(F("Decoded: ")); Serial.print(ptrIRName(IR_Decoder.decode_type)); Serial.print(F(" Value: ")); Serial.println(IR_Decoder.value); IR_Decoder.DumpResults();
// #define IRLIB_TRACE
#define OP_IRLib_TRACE
IR_Decoder.decode(BattleSettings.IR_FireProtocol);
I am a bit concerned about the statement from the compiler indicating:“Sketch uses 25100 bytes (77%) of program storage space. Maximum is 32256 bytes.Global variables use 1864 bytes (91%) of dynamic memory, leaving 184 bytes for local variables. Maximum is 2048 bytes.Low memory available, stability problems may occur.”