TSOP 1738 does not give any serial output in Arduino uno coding

// Serial Monitor TSOP 1738 for IR Remote

#include <IRremote.h>

// Define sensor pin
int RECV_PIN = 5;

// Define IR Receiver and Results Objects
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup() 
  {
  Serial.begin(9600); // Serial Monitor @9600 baud
  Serial.println("Enabling IRin");
  irrecv.enableIRIn(); // Start the receiver
  Serial.println("Enabling IRin");
  }

void loop() 
  {
  if (irrecv.decode(&results)) 
    {
    Serial.println(results.value, HEX); //Print HEX code
    irrecv.resume(); // Receive the next value
    }
}
// End of the code

It shows some error message while executing. The error messages are as follows:

C:\Users\USER\TSOP1738_Serial_Monitor\TSOP1738_Serial_Monitor.ino: In function 'void loop()':
C:\Users\USER\TSOP1738_Serial_Monitor\TSOP1738_Serial_Monitor.ino:22:29: warning: 'bool IRrecv::decode(decode_results*)' is deprecated: Please use IrReceiver.decode() without a parameter and IrReceiver.decodedIRData. . [-Wdeprecated-declarations]
if (irrecv.decode(&results))
^
In file included from C:\Users\USER\OneDrive\Documents\Arduino\libraries\IRremote-3.3.0\src/IRremote.h:188:0,
from C:\Users\USER\TSOP1738_Serial_Monitor\TSOP1738_Serial_Monitor.ino:3:
C:\Users\USER\OneDrive\Documents\Arduino\libraries\IRremote-3.3.0\src/IRReceive.cpp.h:1373:6: note: declared here
bool IRrecv::decode(decode_results *aResults) {
^~~~~~
Sketch uses 5360 bytes (16%) of program storage space. Maximum is 32256 bytes.
Global variables use 647 bytes (31%) of dynamic memory, leaving 1401 bytes for local variables. Maximum is 2048 bytes.


I cannot understand why this code appears . I install IRremote library .

try removing the irrecv.decode(&results) instead use IrReceiver.decode()

@bapiuno, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with your project :wink: See About the Installation & Troubleshooting category.

Version 3 of the IRRemote library has changed things quite a bit. Look at the example code that comes with this new version to learn the new method for receiving/decoding data.

Still not working,

If you provide link , its very useful to me. Thanks

In the IDE, go to File, Examples, IRremote. There are the examples to show how to use to new version of the library.

No suitable example I find.

The SimpleReceiver example is an almost exact copy of your original code, but written to use the v3 calls (e.g. decode()).

In the IDE, File->Examples->IRReceive->SimpleReceiver

Thanks all for your response. I have solve this problem. TSOP 1738 O/P is an active low pin. This is the problem, which no one was pointed out in this forum. Thanks again.

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