Virtual wire Send data of RawCode ?

Hello friends, i have stuck on a piece of code and i would like you’re help please.

I want to use the VirtualWire and IRRemote library together to send from Tx module the raw code so the Rx Modele to use the command Irsend.sendraw(…);

I try the bellow code but no success =(

Tx Module:

#include <VirtualWire.h>

struct TxData {
	int addTx;
	unsigned  int code[150];
};

TxData txData;

void setup(){
	vw_setup(2000);	 // Bits per sec
	vw_set_tx_pin(12);

	Serial.begin(9600);
	pinMode(led,OUTPUT);
}

void loop(){
// for test only the bellow.
	 txData.addTx = 1;
	 txData.code[0] = 250;
	 txData.code[1] = 2050;
	 txData.code[2] = 3050;
	 txData.code[3] = 9050;

	 vw_send((uint8_t *)&txData, sizeof(txData));
	 vw_wait_tx();
	 delay(2000);
}

For the Rx module

#include <VirtualWire.h>
#include <IRremote.h>

struct TxData {
	int addTx;
	unsigned int code[150];
};

TxData txData;

void setup()
{
	vw_setup(2000);
	vw_set_rx_pin(11);
	vw_rx_start();

	Serial.begin(9600);
}

void loop()
{

	uint8_t buf[VW_MAX_MESSAGE_LEN];
	uint8_t buflen = VW_MAX_MESSAGE_LEN;

	if (vw_get_message(buf, &buflen)){
		digitalWrite(led,HIGH);

		vw_rx_stop();
		delay(100);

	for (int i = 0; i < buflen; i++){
			if (i > 0) txData.code[i - 1] = (unsigned int)buf[i]; 
		}

	txData.addTx =buf[0];
	Serial.print("Address found ");
	Serial.println(txData.addTx);
	Serial.print("Code is ");
	for (int i = 0; i < buflen - 1; i++){
		Serial.println(txData.code[i]);
	}
	
         vw_rx_start();  // Start Receive again
	digitalWrite(led,LOW);

}

Try to get small pieces of you code working individually - one piece at a time and post how you get on.

Other than including the IRremote library - I didn't see any use of this library in your code?
If you are not familiar with IRremote, try out all of the examples provided with the library first.

Hello friend with the code above i got the bellow

Address found 1
Code is 0
65530
0
2
8
65514
11
90
35
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

I want to use the SendRaw because with this it is working perfect

I have the bellow code that works ok but i want to send to other place and it is difficult to run cable so the solution of the RF module it is perfect solution to me.

the code it is working ok it is the bellow

#include <IRremote.h>
IRsend irsend;

unsigned int RxGetData[100];
int count = 0;
bool complete = false;

void serialEvent(){
 	while (Serial.available() > 0){
		int RxIn = Serial.read();
		if (RxIn == '\n' || RxIn == '\r' ){
			complete = true;
			break;
		}
		
		if (RxIn != ','){
			RxGetData[count] *= 10;
			RxGetData[count] = ((RxIn - 48) + RxGetData[count]);
		}else{
			count++;
		}
 	}
}

void setup()
{
	Serial.begin(9600);
	Serial.println("Start up Test of Serial Unsigned int");
}

void loop()
{
	if (complete == true){
		complete = false;
		irsend.sendRaw(RxGetData,count,38);
		count = 0;
		memset(RxGetData,0,sizeof(RxGetData));
	}
}

I have write some code in vb.net and send code like 9050,4500,600,500,600,500,650,500,600,1650,600,500,600,500,650,1600,600,550,600,500,600,500,650,1600,600,550,600,500,600,1650,600,500,600,550,600,1600,650,1600,600,1650,600,1650,600,1650,600,1650,600,500,600,1650,600,500,600,550,600,500,600,500,600,550,600,500,600,1650,600,500,650 and working fine, now how i can transmit the (9050,4500,600,500,600,500,650,500,600,1650,600,500,600,500,650,1600,600,550,600,500,600,500,650,1600,600,550,600,500,600,1650,600,500,600,550,600,1600,650,1600,600,1650,600,1650,600,1650,600,1650,600,500,600,1650,600,500,600,550,600,500,600,500,600,550,600,500,600,1650,600,500,650) with the virtualwire library ?

now how i can transmit the (9050,4500,600,500,600,500,650,500,600,1650,600,500,600,500,650,1600,600,550,600,500,600,500,650,1600,600,550,600,500,600,1650,600,500,600,550,600,1600,650,1600,600,1650,600,1650,600,1650,600,1650,600,500,600,1650,600,500,600,550,600,500,600,500,600,550,600,500,600,1650,600,500,650) with the virtualwire library ?

First, you look at the library to see what the maximum size of the array is that can be transmitted. It is nowhere near what you need.

Thank you very much for the reply.

It is good point this, but the thing is that the code in first post (there is the problem) even with under limit gives me wrong data in variable

struct TxData {
	int addTx;
	unsigned int code[150];  // <-- Here i got the wrong data
};
struct TxData {
	int addTx;
	unsigned int code[150];  // <-- Here i got the wrong data
};

What size if that struct? 302+ bytes. How many bytes can the VirtualWire library send in one packet? Here’s a hint. It’s an order of magnitude less than that.

How do you know you got “the wrong data”? What data did you send? What data did you get?

Because the size of code it is not fixed thas why i choose 150 ( but i thing around 80) should be fine.

I thing you are talking for this (about the size)

Macros
#define VW_MAX_MESSAGE_LEN 80
Maximum number of bytes in a message, counting the byte count and FCS.

#define VW_MAX_PAYLOAD VW_MAX_MESSAGE_LEN-3
The maximum payload length.

#define VW_RX_RAMP_LEN 160
The size of the receiver ramp. Ramp wraps modulu this number.

Now about how as i know if the data are correct ?

On Tx module i use:

#include <VirtualWire.h>

struct TxData {
	int addTx;
	unsigned  int code[150];
};

TxData txData;

void setup(){
	vw_setup(2000);	 // Bits per sec
	vw_set_tx_pin(12);

	Serial.begin(9600);
	pinMode(led,OUTPUT);
}

void loop(){
// for test only the bellow.
	 txData.addTx = 1;
	 txData.code[0] = 250;
	 txData.code[1] = 2050;
	 txData.code[2] = 3050;
	 txData.code[3] = 9050;

	 vw_send((uint8_t *)&txData, sizeof(txData));
	 vw_wait_tx();
	 delay(2000);
}

and what i got ?

Address found 1
Code is 0
65530
0
2
8
65514
11
90
35
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

The default value for the VirtualWire buffer size is 30, not 80. That means that the maximum payload size is 27 bytes, not 302+.

It does not matter how many of the 150 elements of the array are populated. sizeof(txData) still returns the size of the struct - 302+ bytes. You can not, no matter what size shoehorn you use, fit 302+ bytes into a 27 byte payload.

Trying to may cause unpredictable behavior. So, stop trying.

Thank you very much for the time and help :slight_smile:

Do you thing is there any way i can do it ?

PC (Softaware) --> Arduino with Tx Module ---> Arduino Rx Module Send irsendraw code ?

I have stuck here
Arduino with Tx Module ---> Arduino Rx Module Send irsendraw code ?

Do you thing is there any way i can do it ?

Of course you can. You simply need to do multiple sends, with 27 bytes of data per packet. Of 26, so the first byte can be the packet number and the other 26 are 13 ints. Perhaps the first packet should be small, just 0 as the packet number and then the number of packets in the next byte.

Then, the receiver simply puts the packets together in the right order.

Yes, you can do it. But you will have to split the data into packets, each containing no more than 27 bytes.

A few comments on why you are getting what seems like the wrong data.

  1. On the receiving end, you get the address from buf[0], put it into txData.addTx) and print it. So far so good
	txData.addTx =buf[0];
	Serial.print("Address found ");
	Serial.println(txData.addTx);
	Serial.print("Code is ");
	for (int i = 0; i < buflen - 1; i++){
		Serial.println(txData.code[i]);
	}

Here’s an experiment for you. Fire up the Windows calculator, choose “Programmer” from the view menu. set it ro Decimal, and type in 250. Now click on Hex You will see that it is FA in Hex. Note in particular that the binary value shows up as (in 2 bytes), 0000 0000 1111 1010. Now type in FFFA and select Decimal again. Oops! Look what happened! FFFA is actually 65530. OK… go the other way. type in 65530, in Decimal mode, and click on Hex. Yes, sure enough, it’s again, 65530.

What the heck is happening? Well, 65530 is 250 with an extended sign. Your ints are getting mangled in translation. You are better off using something like sprintf() to format your ints into strings, delimit them, send them, and change them back into ints on the other end.

Or, you might want to send them as individual unsigned bytes, looping theough the array of ints, but 1 byte at a time instead of an int at a time.

Hello Friends,

Thank you very much PaulS and lar3ry for the time and help ! ! ! :slight_smile:

And sorry for the late delay on reply, today i try to follow you’re instructions ( i hope i understand it well :slight_smile: )

What i did it is

PC code send a command for test every 2 Seconds

#include <MemoryFree.h>
#include <VirtualWire.h>
unsigned int raw[68] = {9050,4450,600,550,600,500,600,550,600,1600,600,550,600,500,600,1650,600,500,600,550,600,500,600,1650,600,500,600,550,600,1650,600,500,600,500,650,1600,600,1650,600,1650,600,1650,600,1600,650,500,600,500,600,1650,600,500,650,500,600,500,600,550,600,500,600,1650,600,1650,600,500,600};
int Address;
unsigned int temp;
char CharMsg[40];//21

void setup(){
	vw_setup(2000);	 // Bits per sec
	vw_set_tx_pin(12);
	Serial.begin(9600);
	Serial.print("Free Memory: ");
	Serial.println(freeMemory());

}

void loop(){
	int size = sizeof(raw)/2;
	 Address = 1;
	 //Serial.print("Size is ");
	 //Serial.println(size);

	 sprintf(CharMsg,"%u,%u",Address, size);//Command
	 vw_send((uint8_t *)CharMsg, strlen(CharMsg));
	 vw_wait_tx();

	 Serial.print("Address: ");
	 Serial.println(Address);
	 Serial.print("Array Size: ");
	 Serial.println(size);
	 delay(100); // Wait for the recever

	 for (int i = 0; i < size; i++){
		 temp = raw[i];
		 sprintf(CharMsg,"%ud", temp);//Command
		 vw_send((uint8_t *)CharMsg, strlen(CharMsg));
		 vw_wait_tx();
		/* Serial.print(i);
		 Serial.print(" - ");
		 Serial.println(temp);*/
	 }
	 delay(2000);
}

On TV side what i do is

#include <MemoryFree.h>
#include <VirtualWire.h>
#include <IRremote.h>
IRsend irsend;

#define led 13

int z;
int Address;
int size;
unsigned int Command;
char StringReceived[40]; //22

bool validMine = false;

void setup()
{
	vw_setup(2000);
	vw_set_rx_pin(11);
	vw_rx_start();

	pinMode(led,OUTPUT);

	Serial.begin(9600);
	Serial.print("Free Memory: ");
	Serial.println(freeMemory());
}

void loop(){

	uint8_t buf[VW_MAX_MESSAGE_LEN];
	uint8_t buflen = VW_MAX_MESSAGE_LEN;

	if (vw_get_message(buf, &buflen)){
		digitalWrite(led,HIGH);
		vw_rx_stop();
		memset(StringReceived, 0, sizeof(StringReceived)); // clear variable

		for (int i = 0; i < buflen; i++){
			StringReceived[i] = char(buf[i]);
		}

		if (validMine == false){
			sscanf(StringReceived, "%u,%u", &Address, &size);
			Serial.print("Adderss ");
			Serial.println(Address);
			Serial.print("Size ");
			Serial.println(size);
			if (Address == 1){
				validMine = true;
				z = -1;
				Command = 0;
				memset(StringReceived, 0, sizeof(StringReceived)); // clear variable
			}
		}

		unsigned int RxCode[size * 2];

		if (validMine == true){
			sscanf(StringReceived, "%ud", &Command);
			RxCode[z] = Command;
			z++;
			if (z == size) {
				validMine = false;
				z = 0;

				memset(StringReceived, 0, sizeof(StringReceived)); // clear variable
				delay(100);
				irsend.sendRaw(RxCode,size,38);
				/*for (int x = 0; x < size; x++){
					Serial.print(x);
					Serial.print(" - ");
					Serial.println(RxCode[x]);
				}*/
			}
		}
         vw_rx_start();  // Start Receive again
         digitalWrite(led,LOW);

	}
}

Form Serial debug of numbers i got and compare is

PC Send	TV Get
0 - 9100	0 - 9100
1 - 4450	1 - 4450
2 - 600	2 - 600
3 - 500	3 - 500
4 - 600	4 - 600
5 - 500	5 - 500
6 - 650	6 - 650
7 - 500	7 - 500
8 - 600	8 - 600
9 - 1650	9 - 1650
10 - 600	10 - 600
11 - 500	11 - 500
12 - 600	12 - 600
13 - 500	13 - 500
14 - 650	14 - 650
15 - 1600	15 - 1600
16 - 600	16 - 600
17 - 550	17 - 550
18 - 600	18 - 600
19 - 500	19 - 500
20 - 600	20 - 600
21 - 500	21 - 500
22 - 650	22 - 650
23 - 1600	23 - 1600
24 - 600	24 - 600
25 - 550	25 - 550
26 - 600	26 - 600
27 - 500	27 - 500
28 - 600	28 - 600
29 - 1650	29 - 1650
30 - 600	30 - 600
31 - 500	31 - 500
32 - 650	32 - 650
33 - 500	33 - 500
34 - 600	34 - 600
35 - 1600	35 - 1600
36 - 650	36 - 650
37 - 1600	37 - 1600
38 - 600	38 - 600
39 - 1650	39 - 1650
40 - 600	40 - 600
41 - 1650	41 - 1650
42 - 600	42 - 600
43 - 1650	43 - 1650
44 - 600	44 - 600
45 - 1600	45 - 1600
46 - 650	46 - 650
47 - 1600	47 - 1600
48 - 650	48 - 650
49 - 1600	49 - 1600
50 - 600	50 - 600
51 - 550	51 - 550
52 - 600	52 - 600
53 - 500	53 - 500
54 - 600	54 - 600
55 - 500	55 - 500
56 - 600	56 - 600
57 - 550	57 - 550
58 - 600	58 - 600
59 - 500	59 - 500
60 - 600	60 - 600
61 - 550	61 - 550
62 - 600	62 - 600
63 - 500	63 - 500
64 - 600	64 - 600
65 - 500	65 - 500
66 - 600	66 - 600
67 - 0	67 - 0

The results: The numbers it is looking ok but the command irsend.sendRaw(RxCode,size,38); is not respond

Also the data it is delay to much to send, it is make 7 Seconds every flash on IR emitter led.

And i thing the range it is dropped a lot ( i believe this happen because of too much traffic ?) .

Please can you tell me what i have lost - what i have make wrong ?

Thank you in advance.

Best Regards,
And Happy New Year ! ! !

	if (vw_get_message(buf, &buflen)){

Instead of using two arrays, one char and one uint8_t, you can tell this function that one array (the char one) is the other type.

	if (vw_get_message((uint8_t *)StringReceived, &buflen)){

This works because uint8_t and char are the same size - 8 bits each.

Happy new Year to all of you ! ! ! :slight_smile:

Thank you very much PaulS :slight_smile:

I also found in VirtualWire.h the

/// Maximum number of bytes in a message, counting the byte count and FCS
#define VW_MAX_MESSAGE_LEN 100// I change this to 100

and now i can use an array of 48 :slight_smile: at least work on Debug using the serial monitor from tx to rx in around 1 Sec that's good :slight_smile:

I will try later the command to use it with the ir library, i hoppe this time to be work as i expect it. :slight_smile:

FYI
This looks like a standard NEC 32 bit IR protocol.

The valid lengths are 9000,4500,560,1690 uSecs. So if you adjust your values to these you may get a better signal & range overall!

so
{9050,4450,600,550,600,500,600,550,600,1600,600…

would become

{9000,4500,560,560,560,560,560,560,560,1600,560…

even better would be to decode & send the signal as NEC using IRremote and you would only have to exchange 32 bits each time instead of 67*8 bits. Same RAM too!

Thank you very much for the replay AnalysIR :slight_smile:

You are write the first dump was

1224FF00  // Power 
Decoded NEC: 1224FF00 (32 bits)
Raw (68): -23622 8950 -4450 600 -500 600 -500 600 -500 600 -1650 600 -500 600 -500 600 -1650 600 -500 600 -500 600 -500 600 -1650 600 -500 600 -500 600 -1650 600 -500 600 -500 600 -1650 600 -1600 600 -1650 600 -1600 600 -1600 600 -1650 600 -1600 600 -1650 600 -500 600 -500 600 -500 650 -500 600 -500 600 -500 600 -500 600 -550 600

but on the satreceiver it was not always work with the nec protocol ( I will try to test later today you’re tip :wink: )

Also i have another one satellite receiver that gives me the bellow dump

ower

4D6AA46A
Unknown encoding: 4D6AA46A (32 bits)
Raw (18): -27544 250 -850 250 -750 250 -850 250 -2800 250 -1250 250 -1300 250 -1250 250 -1150 250 
4D6AA46A
Unknown encoding: 4D6AA46A (32 bits)
Raw (18): -7064 250 -850 300 -700 250 -850 250 -2800 250 -1250 300 -1250 250 -1250 300 -1100 250 


Program Up

4D6AA46A
Unknown encoding: 4D6AA46A (32 bits)
Raw (18): -7246 300 -850 250 -700 250 -850 300 -2750 250 -1300 250 -1250 250 -1300 250 -1100 300 
4D6AA46A
Unknown encoding: 4D6AA46A (32 bits)
Raw (18): -7114 300 -850 250 -700 250 -850 300 -2750 250 -1300 250 -1250 250 -1300 250 -1100 300 



Program Down

4D6AA46A
Unknown encoding: 4D6AA46A (32 bits)
Raw (18): -19078 250 -850 250 -700 250 -850 300 -2750 300 -1250 250 -1250 300 -1250 250 -1150 250 
4D6AA46A
Unknown encoding: 4D6AA46A (32 bits)
Raw (18): -7164 250 -850 300 -700 250 -850 250 -2800 250 -1250 300 -1250 250 -1250 250 -1150 250

It is strange to me it is send 2 times the raw code.

Thank you

Your SAT signal is a bit more unusual.
I have attached a trace image of both parts of your first signal FYI.

Some protocols send the signal twice (or more) like this for error checking etc

It looks like there is a gap of just over 7,000 uSecs between each signal.

IRremote measures timings with a granularity of 50 uSecs and this could be an issue for your SAT signal - although you can reduce this in the library by chaning the relevant definition.

What is the model of your SAT device/remote?

I have send you a pm with the details of the sat :wink:

I have complete stuck ! ! !

The Tx RF modula (with arduino uno) Send the data to the Rx RF modula (arduino pro mini) using raw code, but the irsend.sendRaw command it flash on camera but it is not change the Volume, If i use the arduino direct without the RF module then the irsend.sendRaw command it is working fine.

The code for the Tx is

#include <VirtualWire.h>
unsigned int raw[68] = {9050,4450,600,550,600,500,600,550,600,1600,600,550,600,500,600,1650,600,500,600,550,600,500,600,1650,600,500,600,550,600,1650,600,500,600,500,650,1600,600,1650,600,1650,600,1650,600,1600,650,500,600,500,600,1650,600,500,650,500,600,500,600,550,600,500,600,1650,600,1650,600,500,600};

const int numberOfAnalogPins = 48; //(up to 48 it is ok, more do nothing)
int data[numberOfAnalogPins]; // from some sample
const int dataBytes = numberOfAnalogPins * sizeof(int);
const unsigned int size = sizeof(raw);
static int count = 0; // Should be static ?
const int realSize = sizeof(raw)/sizeof(int); // is that correct ?
bool complete = false;

void send (byte *data, int nbrOfBytes){
	vw_send(data, nbrOfBytes);
	vw_wait_tx(); // Wait until the whole message is gone
}


void setup(){
	vw_setup(2000);
		Serial.begin(57600);
	Serial.print("Size is: ");
	Serial.println(realSize);
	Serial.print("size/48 = ");
	Serial.println(size/48);
}

void loop(){
	count = 0;
	const int timesFor = (size / 48) + 1;

	for (int x = 1; x <= timesFor; x++){
		Serial.print("X Value: ");
		Serial.println(x);

		if (complete == true){
			complete = false;
			break;
		}

		for(int i = 0; i < numberOfAnalogPins; i++){
			data[i] = raw[count]; // store the values into the data buffer
			count++;
			if (count >= realSize) {
				Serial.println("Used break now");
				complete = true;
				break;
			}
		}
		send((byte*)data, dataBytes);
	}
	delay(2000); //send every second
}

The code for Rx

#include <VirtualWire.h>
#include <IRremote.h>
IRsend irsend;

const int numberOfAnalogPins = 48; // From sample i got this
int data[numberOfAnalogPins];
const int dataBytes = numberOfAnalogPins * sizeof(int);
byte msgLength = dataBytes;

unsigned int RxGet[68];
int count = 0;

#define led 13


void setup(){
    Serial.begin(57600);
    Serial.println("Ready");
    vw_setup(2000);
    vw_rx_start();
}

void loop(){
	if (count > 50) count = 0;
  if (vw_get_message((byte*)data, &msgLength)){
	digitalWrite(led,1);

      for (int i = 0; i <  numberOfAnalogPins; i++){
    	RxGet[count] = data[i];

    	Serial.print("Num  -->  ");
    	Serial.print(count);
    	Serial.print("  -  RxGet[count] -->  ");
        Serial.println(RxGet[count]);

		if(data[i] == 0){
			Serial.println("Send IR");
			Serial.println(sizeof(RxGet)/2);
			vw_rx_stop();   // Stop RF Receiver
			delay(200);
			irsend.sendRaw(RxGet,sizeof(RxGet)/2,38);
			delay(50);
			vw_rx_start();  // Start Receive again
			break;
		}
		count++;
      }
    digitalWrite(led,0);
  }
}

on VirtualWire.h i do the bellow changes

/// Maximum number of bytes in a message, counting the byte count and FCS
#define VW_MAX_MESSAGE_LEN 100//80

/// The size of the receiver ramp. Ramp wraps modulu this number
#define VW_RX_RAMP_LEN 200// 160

and the result after serial monitor

Rx Get	                                                              Tx Send
Num  -->  0  -  RxGet[count] -->  9050	9050
Num  -->  1  -  RxGet[count] -->  4450	4450
Num  -->  2  -  RxGet[count] -->  600	600
Num  -->  3  -  RxGet[count] -->  550	         550
Num  -->  4  -  RxGet[count] -->  600	600
Num  -->  5  -  RxGet[count] -->  500	         500
Num  -->  6  -  RxGet[count] -->  600	600
Num  -->  7  -  RxGet[count] -->  550	        550
Num  -->  8  -  RxGet[count] -->  600	600
Num  -->  9  -  RxGet[count] -->  1600	1600
Num  -->  10  -  RxGet[count] -->  600	600
Num  -->  11  -  RxGet[count] -->  550	550
Num  -->  12  -  RxGet[count] -->  600	600
Num  -->  13  -  RxGet[count] -->  500	500
Num  -->  14  -  RxGet[count] -->  600	600
Num  -->  15  -  RxGet[count] -->  1650	1650
Num  -->  16  -  RxGet[count] -->  600	600
Num  -->  17  -  RxGet[count] -->  500	500
Num  -->  18  -  RxGet[count] -->  600	600
Num  -->  19  -  RxGet[count] -->  550	550
Num  -->  20  -  RxGet[count] -->  600	600
Num  -->  21  -  RxGet[count] -->  500	500
Num  -->  22  -  RxGet[count] -->  600	600
Num  -->  23  -  RxGet[count] -->  1650	1650
Num  -->  24  -  RxGet[count] -->  600	600
Num  -->  25  -  RxGet[count] -->  500	500
Num  -->  26  -  RxGet[count] -->  600	600
Num  -->  27  -  RxGet[count] -->  550	550
Num  -->  28  -  RxGet[count] -->  600	600
Num  -->  29  -  RxGet[count] -->  1650	1650
Num  -->  30  -  RxGet[count] -->  600	600
Num  -->  31  -  RxGet[count] -->  500	500
Num  -->  32  -  RxGet[count] -->  600	600
Num  -->  33  -  RxGet[count] -->  500	500
Num  -->  34  -  RxGet[count] -->  650	650
Num  -->  35  -  RxGet[count] -->  1600	1600
Num  -->  36  -  RxGet[count] -->  600	600
Num  -->  37  -  RxGet[count] -->  1650	1650
Num  -->  38  -  RxGet[count] -->  600	600
Num  -->  39  -  RxGet[count] -->  1650	1650
Num  -->  40  -  RxGet[count] -->  600	600
Num  -->  41  -  RxGet[count] -->  1650	1650
Num  -->  42  -  RxGet[count] -->  600	600
Num  -->  43  -  RxGet[count] -->  1600	1600
Num  -->  44  -  RxGet[count] -->  650	650
Num  -->  45  -  RxGet[count] -->  500	500
Num  -->  46  -  RxGet[count] -->  600	600
Num  -->  47  -  RxGet[count] -->  500	500
Num  -->  48  -  RxGet[count] -->  600	600
Num  -->  49  -  RxGet[count] -->  1650	1650
Num  -->  50  -  RxGet[count] -->  600	600
Num  -->  51  -  RxGet[count] -->  500	500
Num  -->  52  -  RxGet[count] -->  650	650
Num  -->  53  -  RxGet[count] -->  500	500
Num  -->  54  -  RxGet[count] -->  600	600
Num  -->  55  -  RxGet[count] -->  500	500
Num  -->  56  -  RxGet[count] -->  600	600
Num  -->  57  -  RxGet[count] -->  550	550
Num  -->  58  -  RxGet[count] -->  600	600
Num  -->  59  -  RxGet[count] -->  500	500
Num  -->  60  -  RxGet[count] -->  600	600
Num  -->  61  -  RxGet[count] -->  1650	1650
Num  -->  62  -  RxGet[count] -->  600	600
Num  -->  63  -  RxGet[count] -->  1650	1650
Num  -->  64  -  RxGet[count] -->  600	600
Num  -->  65  -  RxGet[count] -->  500	500
Num  -->  66  -  RxGet[count] -->  600	600
Num  -->  67  -  RxGet[count] -->  0

What i send it looks is what i get on RxGet (except from Num 67 ?)

Please help i try to much and i can’t thing what is the problem .

PS. I check with my camera the IR emitter and it is flash but not respond. =(

tasosstr:
What i send it looks is what i get on RxGet (except from Num 67 ?)

I think this is because

unsigned int raw[68]

is wrong and should be

unsigned int raw[67]

you only have 67 values in the array & that is why you are getting zero for the last.

Also, change the all values to one of 9000,4500,560,1690 as per my previous post - it will improve the signal