Arduino - Emitting Infrared Signal

Asked

Viewed 85 times

0

I’m trying to turn on and off a projector Sony with Arduino, already managed to capture the code sent by control. But when transmitting this signal to the projector, nothing happens. Can someone please help? This is the code I’m using:

#include <boarddefs.h>
#include <IRremote.h>
#include <IRremoteInt.h>
#include <ir_Lego_PF_BitStreamEncoder.h>

IRsend irsend;

void setup()
{
}

void loop() 
{
    for (int i = 0; i < 3; i++) 
{
    irsend.sendSony(0x542A, 32);
    delay(40);
}

delay(5000); //5 segundos

}

I also tried to send the RAW, it was like this:

#include <boarddefs.h>
#include <IRremote.h>
#include <IRremoteInt.h>
#include <ir_Lego_PF_BitStreamEncoder.h>

IRsend irsend;

void setup()
{
}

void loop() 
{
    for (int i = 0; i < 3; i++) 
{irsend.sendSony(160602400600115060060060012006006006001200550600600600600600600600600120060060060012005506006001200600600, 32);

    delay(40);
}

delay(5000); //5 segundos

}
  • Made sure the infra-red LED is actually emitting?

  • Yes, the LED was emitting signal. Thanks for the help, but I already solved the problem. I am sending the control code in the wrong way. Here’s the code that worked: #include <boarddefs. h> #include <Irremote. h> #include <Irremoteint. h> #include <ir_Lego_PF_BitStreamEncoder. h> Irsend irsend; void setup() { } loop void() { for (int i = 0; i < 3; i++) { irsend.sendSony(0x542A, 15); delay(20); } delay(1000); }

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.