All
So I have just updated to Arduino Ver 1.6.4 and have a problem. :o
Previously using Ver1.6.3 my code, below, compiled and worked ok ..
But now I get the message when compiling;
"Arduino: 1.6.4 (Windows 7), Board: "Arduino Uno"
sketch_IRreader_and_SDCard_may23d.ino:18:71: fatal error: TMRpcm.h: No such file or directory
compilation terminated.
Multiple libraries were found for "IRremote.h"
Used: C:\Program Files (x86)\Arduino\libraries\RobotIRremote
Not used: C:\Users\andy.upton\Documents\Arduino\libraries\Arduino-IRremote-master
Multiple libraries were found for "IRremoteInt.h"
Used: C:\Users\andy.upton\Documents\Arduino\libraries\Arduino-IRremote-master
Not used: C:\Program Files (x86)\Arduino\libraries\RobotIRremote
Error compiling.
"
As I don't appear to have done anything, id welcome your advice
The code I refer to is as follows;
// Title: IR Reader and Action Trigger (inc Sound Files on SD Card) + TBC
// Date: 31 May'15
// Notes: Compiled ok and worked on 31May after adding case/switch routine from Tronixstuff.com
//
/////////////////////////////////////////////////////////////////////////////////
// IRremote Libraries
#include <IRremote.h>
#include <IRremoteInt.h>
int RECV_PIN = 7; // using digital pin 7 on Uno for IR Rx. Chgd from 11 to 7 as conflict'd with SDcard MOSI pin
IRrecv irrecv(RECV_PIN);
decode_results results;
// SD Card Libraries
#include <SPI.h>
#include <SD.h>
#define SD_ChipSelectPin 4 // using digital pin 4 on arduino nano 328 for SD card select (CS)
#include <TMRpcm.h> // also need to include this library...
TMRpcm tmrpcm; // create an object for use in this sketch
char mychar;
void setup()
{ // put your setup code here, to run once:
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
tmrpcm.speakerPin = 9; // using digital pin 9 on Uno, Nano (11 on Mega) for Spkr output
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
}
tmrpcm.play("start.wav"); // Sound file "Start" will play each time arduino powers up, or is reset
}
void translateIR()
{ // put your main code here, take action based on IR code rxd
switch(results.value)
{
case 0x9716BE3F: tmrpcm.play("button1.wav"); Serial.println(" Button #1"); break; // Check IR input for hex 9716BE3F(for button1)to start playback
case 0x3D9AE3F7: tmrpcm.play("button2.wav"); Serial.println(" Button #2"); break; // Check IR input for hex 3D9AE3F7(for button2)to start playback
case 0x6182021B: tmrpcm.play("R2D2.wav"); Serial.println(" Button #3"); break; // Check IR input for hex 3D9AE3F7(for button2)to start playback
default: Serial.println(" Nothing ?");
}
delay(300); // adds a short delay (consider removing later)
}
void loop()
{// put your main code here, to run repeatedly:
if (irrecv.decode(&results)) // Check we have received am IR Signal and run Sub routine ?
{
translateIR(); // run the Case routine to check on value rxd
irrecv.resume(); // receive next IR value
}
}