Scanning remote codes giving random results each button press #1337
Unanswered
DarkKaplah
asked this question in
Help
Replies: 1 comment
-
|
Please do not use the tested examples from the library. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'll try to be brief here. I'm running a ESP8266 NodeMCU and this IR device: https://www.amazon.com/dp/B087ZRD3LH?ref=ppx_yo2ov_dt_b_fed_asin_title
I have it hooked up on a breadboard. Hardware is working. I've used the example scripts and other IR Remote scripts located on YouTube. No matter what I'm running the code that's output to the serial console varies.
I'm using various remotes that span 40 years to verify that it's not a "cheap IR transmitter" issue. These include:
My process is to repeatedly hit one button on the remote I'm testing repeatedly every 2 seconds. My script has a 1500 ms delay.
Checked the specs of my IR receiver. The 3.3v provided by the 8266 should be driving it high enough. I'm at a bit of a loss. I've found other posts with similar issues. Frequently you see blame pointed towards cheap IR remotes. These come from a range of devices so I'm fairly sure this isn't the issue here.
Here's my code.
`
#include <IRremote.hpp>
#define IR_RECEIVE_PIN D1
#define ENABLE_LED_FEEDBACK true
#define FEEDBACK_LED_PIN D4
void setup()
{
Serial.begin(9600); // // Establish serial communication
IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK, FEEDBACK_LED_PIN); // Start the receiver
}
void loop() {
//Serial.print("Waiting on signal");
if (IrReceiver.decode()) {
Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX); // Print "old" raw data
IrReceiver.printIRResultShort(&Serial); // Print complete received data in one line
delay(1500);
IrReceiver.resume(); // Enable receiving of the next value
}
}
`
Beta Was this translation helpful? Give feedback.
All reactions