IR send RAW


hello,

first of all: please bear me, i'm beginner :-)

i created sketch receive code ir remote.

the code is:

- 551502015
- (hex):20df40bf

code receive:
#include <irremote.h>

int recv_pin = 11;
irrecv irrecv(recv_pin);
decode_results results;

void setup()
{
  serial.begin(9600);
  irrecv.enableirin(); // start receiver
}

void loop()
 {
  if(irrecv.decode(&results))
  {
   serial.print("received: ");
   serial.println(results.value);
   serial.print("received (hex):");
   serial.println(results.value, hex);
   irrecv.resume(); // receive next value
  }
}

now i'd send code tv. important know able "mirror" kind of code. predefined libraries "irsend.sendsony" not option.

based on posts on web created below sketch. think not entirely understand unsigned int bit. in examples looked people using arrays containing multiple codes. have one. doesn't work, led not illuminate or it's short see via digital camera. irsend.sendsony code can see btw.

your appreciated!!  ;d


code send:
#include <irremote.h>
irsend irsend;

unsigned int rawcodes[1] = {551502015};

void setup()
{
  serial.begin(9600);
}

void loop()
{
  if (serial.read() != -1) // send via serial send signal
  {
    (int = 0; < 3; i++)
    {
      irsend.sendraw(rawcodes, 1, 38); // 38 = khz
      //irsend.sendsony(0xa90, 12); // sony tv power code
      delay(100);
    }
  }
}

code: [select]
unsigned int rawcodes[1] = {551502015};
551502015 not fit int, signed or otherwise.

code: [select]
unsigned int rawcodes[] = {5,5,1,5,0,2,0,1,5};

code: [select]
for (int = 0; < 9; i++)
    {
      irsend.sendraw(rawcodes[i], 1, 38); // 38 = khz
      //irsend.sendsony(0xa90, 12); // sony tv power code
      delay(100);
    }

would make more sense, still might not right.


Arduino Forum > Using Arduino > Programming Questions > IR send RAW


arduino

Comments

Popular posts from this blog

Static ip - Raspberry Pi Forums

arduino bug sur secteur, batterie, mais pas en usb?

What voltage is sent to the arduino GND when a transistor is used