Irsend Transmitter problem

Serial.println(veri, Hex); The value looks correct when I type it, but irsend.sendNEC(veri); irsend is not sending data when I write this. how in HEX format ie irsend.sendNEC(veri, HEX); i can do something like this

#include <IRremote.h>
IRsend irsend;
int RECV_PIN = 7;

IRrecv irrecv(RECV_PIN);

decode_results results;
int buton=5;
int buton1=0;
long veri;
void setup()
{
  pinMode(buton, INPUT);
  Serial.begin(9600);
  irrecv.enableIRIn(); 
}

void loop() {
  
  if (irrecv.decode(&results)) {
    veri=results.value;
    Serial.println(results.value, HEX);
    delay(2000);
    irrecv.resume(); 
    
  }
  buton1=digitalRead(buton);
  
  if(buton1==1){
  
  irsend.sendNEC(veri, 32);
  Serial.println(veri, HEX);
  
  delay(1000);
  
}
}

we told you in another post about data formats.

Use

irsend.sendNEC(veri, 32);

HEX is specific to the print function...

32 is the size of the NEC coding.

āžœ you are still confusing a value and its screen representation and what function parameters are used for...

Hello, the problem was the cable in front of the IR receiver, the data was not going, that's why, thanks

problem solved

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.