so, still doing tests and got blocked on a new problem now
#ifndef InfraVermelho_h
#define InfraVermelho_h
#include "Arduino.h"
#include "IRremote.h"
IRrecv irrecv; // create instance of 'irrecv'
decode_results results; // create instance of 'decode_results'
class InfraVermelho {
public:
InfraVermelho(int pinoSinal);
void setup();
void translateIR();
void readBotao();
};
InfraVermelho :: InfraVermelho(int pinoSinal) {
irrecv = IRrecv(pinoSinal);
}
"IRecv" is from a lib i don't want to mess around with. As far as i understood, i need to instantiate it with the pin i'm going to use. So my idea were to do that on the single constructor i made for the class "InfraVermelho" but i get the error
"no matching function for call to 'IRrecv::IRrecv()'"
on line 7. I suppose i cannot just create a reference and later on instantiate ?
since i don't know the pin before using the constructor, i'm kind of lost on what to do.
Any workaround ? ideas ? Or am i just doing something wrong ?
Edit: maybe it's worth to mention that "IRrecv(pin);" is the only constructor for IRrecv (reason i got the error, well, at least there's no "IRrecv()") and there's no function to change the pin value later on the lib