@ScruffR Apologies if this is coming in at the wrong point of reply. I am trying to use the IRremote library to implement a simple IR based beacon/virtual tether. The idea being an IR beacon (emitter) is placed on a ceiling/wall in a room and if the tethered devices (receivers) stop detecting the IR beacon signal then they have been removed from the room and will publish an event/alarm message.
I have included the IRremote (0.0.1) library off the web IDE in a simple receiving test code and this works fine when driven by a keyes IR handset.
I have write a very simple sketch using IRremote again to transmit a Sony Power on code
#include <IRremote.h>
/*******************************************************
* Simple IR LED Beacon demo
* 9 March 2017
* Note TX is the output pin hard baked in
* *****************************************************/
#define LED_PIN D7
//
IRsend irsend;
//
void setup()
{
Serial.begin(9600);
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
delay(2000);
Serial.println("setup in IR Beacon");
}
//
void loop()
{
Serial.println("Transmit Data");
for (int i = 0; i < 50; i++)
{
irsend.sendSony(0xa90, 12); // Sony TV power code
digitalWrite(LED_PIN, HIGH);
delay(40);
digitalWrite(LED_PIN, LOW);
}
Serial.println("Wait 5 seconds");
delay(5000);
}
However, when I build this I get the following error:
/src/irbeacon.cpp:1:22: fatal error: IRremote.h: No such file or directory
#include <IRremote.h>
^
compilation terminated.
make[1]: *** [../build/target/user/platform-6src/irbeacon.o] Error 1
make: *** [user] Error 2
Clearly I am missing something here