#include "DPir.h"
#define IRpin 4
DPir dpir(IRpin,10000); // 10000 us je minimalni razmak između dva IR koda
void setup() {
// put your setup code here, to run once:
pinMode(13, OUTPUT);
}
int k=0;
void loop() {
// put your main code here, to run repeatedly:
if(dpir.available()!=0)
{
uint32_t IRcode = dpir.getCode();
if(IRcode == 0x94155415) digitalWrite(13, !digitalRead(13));
}
}