Maker Pro
Maker Pro

IR: Custom Messages

So I'm trying to get my Arduino UNO to send IR messages to my Nanos, but all is not going according to plan. I have an IR receiver attached to my nano and the transmitter on my uno, but I'm stuck. I want to send signals from the uno to the nano and use it as some sort of remote. Here is my code:

Transmitter:


#include <IRremote.h>
IRsend irsend;

void setup() {
Serial.begin(9600);
}
void loop() {
irsend.sendNEC(0xAA00AA, 32); // What args do I use here?
Serial.println("Sending Message...");
digitalWrite(13,HIGH);
delay(250);
digitalWrite(13,LOW);
delay(750);
}


Receiver:

#include <IRremote.h>
IRrecv irrecv(8);
decode_results results;

void setup() {
Serial.begin(9600);
pinMode(8,INPUT);
irrecv.enableIRIn();
}

void loop() {
Serial.println("Attempting Read...");
if(irrecv.decode(&results))
switch(results.value){
Serial.println(results.value);
}
delay(500);
}


My main question is, in the transmitter code, what code exactly do I transmit? Right now, while this code is running, the nano does not print the results of the code sent.
 
Hi Nate,
It is always helpful to supply things like a link to your project so others can see what you are dealing with.

I have an inkling you may be jumping in midstream instead of doing it from the start, hence the confusion on your part.

However, I took a quick peek on Github and found some info that might be of some assistance to you in the meantime.
https://github.com/z3t0/Arduino-IRremote/wiki

Cheers Jorgo
 
Hi Nate,
It is always helpful to supply things like a link to your project so others can see what you are dealing with.

I have an inkling you may be jumping in midstream instead of doing it from the start, hence the confusion on your part.

However, I took a quick peek on Github and found some info that might be of some assistance to you in the meantime.
https://github.com/z3t0/Arduino-IRremote/wiki

Cheers Jorgo
Thanks! I did give some info on the project and all the code. I'm trying to get info on one specific part of it: being able to send custom commands over an ir signal.

Edit: I did look over the link you sent and I have read the information. Still, there is nothing about what code you are supposed to transmit for a home-made receiver.
 
Top