About IT signal receiving

Hi,
I tested the IR Infrared Transmitter Module and Ir Receiver Sensor Module:

used code below.

  1. the serial monitor data:
val =1023
val =1023
val =24
val =26
val =1022
val =1023
val =25
val =1022

IR Transmitter ON: val = 25;
IR Transmitter OFF: val = 1022;

I keep the IR Transmitter ON, why the val readings alternately?

  1. I toward the IR Transmitter to Receiver and the readings keep continue come out as above, nothing readings come out when I moved the IR Transmitter away for a moment and toward to Receiver again, unless I turned the IR Transmitter OFF and ON again. why?

Thanks for help.
Adam

int IRreceiverFL = A0;  // left SERVO to 47


void setup() {
  // put your setup code here, to run once:

  Serial.begin(9600);
  Serial.println("xxx_setup!");

  Serial.print("File   : "), Serial.println(__FILE__);
  const char compile_date[] = __DATE__ " " __TIME__;
  Serial.print("Compile timestamp: ");
  Serial.println(compile_date);

  pinMode(IRreceiverFL, INPUT);

}

void loop() {

  FLReading();
}

The IR transmitter is a IR LED.

The IR receiver is like a TSOP1738. It is not made to detect when an IR light is of or off, like in a light gate where something breaks a light beam. They are made to detect and demodulate signals from an IR remote control like a TV remote. IR remote signals ride on (modulate) a 38KHz carrier. Light not modulated at 38KHz is not recognized. There is lots of information on using IR remote receivers on the net.

Use a library like IRremote library to decode the remote signals.

1 Like

Thanks.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.