cyborg5 / IRLib2

Library for receiving, decoding, and sending infrared signals using Arduino
GNU General Public License v3.0
384 stars 138 forks source link

Not working inside setup function #55

Closed b2cbd closed 5 years ago

b2cbd commented 6 years ago
#include <IRLibSendBase.h>
#include <IRLib_P01_NEC.h> 
#include <IRLibCombo.h>

#define buttonCode 0xF7E01F

IRsend sendir;

void setup()
{
   // if i put it here, it doesn't work , no error 
   sendir.send(NEC,buttonCode,0);
}

void loop()
{
   // it works here!
   sendir.send(NEC,buttonCode,0);
}

what's wrong when I put it inside setup funciton?

cyborg5 commented 6 years ago

Were you able to resolve this on your own? I couldn't figure out what was wrong. Please tell us what you did in case someone else had a similar problem.

b2cbd commented 5 years ago

It needed some delay after powering on the device, nothing related to this library. Thanks.