Go Down

Topic: help to build an ir transmitter (Read 2217 times) previous topic - next topic

guys,
i am new to arduino,
i working with tsop and ir leds to build a remote
i have wrote a basic code to transmit a nec code in hex"1FE50AF"
the code i wrote is
#include <CppList.h>
#include <IRremote.h>
#include <IRremoteInt.h>
#include <IRremote.h>
IRsend irsend;
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn();
}
void loop()
{

  irsend.sendNEC(0x1FE50AFUL,32);
  Serial.print("Sent NEC ");
 
  irrecv.decode(&results) ;
 
    Serial.println(results.value);
    irrecv.resume(); // Receive the next value
 

}
my leds is illuminating but i am not receiveing in tsop..can you guys help me

AnalysIR

Couple of things

You need to place your code in code tags (the # button on top when editing) otherwise too hard to read your code.

You cannot send and receive at the same time using IRremote - as it doesnt make sense. You need to have 2 different Arduino systems to test one a sender and one a receiver.

Normally people use an existing remote control to test receiving and a TV to test sending - thus no need for 2 Arduinos.
Visit our Blog about Infrared Remote Control >>>> http://www.AnalysIR.com/blog/  Twitter: @AnalysIR
First Read this PDF=> 10 common pitfalls with Infrared Remote Control >>> http://bit.ly/1cvd0at

Drew Davis

This should help you out...

https://learn.sparkfun.com/tutorials/ir-control-kit-hookup-guide

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy