Pages: [1]   Go Down
Author Topic: help to build an ir transmitter  (Read 1996 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Dublin, Ireland
Offline Offline
Sr. Member
****
Karma: 13
Posts: 496
AnalysIR - IR Analyzer & Decoder for Arduino & MCUs
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Blog: http://www.AnalysIR.com/blog/     Twitter: @AnalysIR
Read => 10 common pitfalls with Infrared Remote Control :  http://bit.ly/1cvd0at

Florida
Offline Offline
God Member
*****
Karma: 2
Posts: 559
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This should help you out...

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

Pages: [1]   Go Up
Jump to: