Inconsistent UART results from ESP32 and Arduino Uno

I have a spare IR remote that I wanted to use with an ESP32 project, so I used an Arduino Uno (the ESP32 was hooked up to another circuit at the moment) to capture the signals. I wrote them down and left to work with them later. Today I wanted to finally use the remote, so I connected the receiver to an ESP32, and the results were COMPLETELY different, kinda seeming random at times. I've captured some images just now to show the inconsistencies.

Arduino Uno: image
ESP32: image

The ESP32 pulse doesn't even resemble a signal and just spits out seemingly random zero's. How can I fix this? I need to use the ESP32, because the Arduino is way too slow for my uses.

Shall we assume an IR receiver? Which.
Are you using an IR library? Which w/ link.
What ESP32 module?
IDE settings for ESP32: freq, etc?
Code? Show.
Schematic of test hookup? Provide.

Review and do your best to provide:
How to get the best out of this forum - Using Arduino / Project Guidance - Arduino Forum

IR receiver: TSOP1230
IR library: none
ESP module: ESP-WROOM-32D
IDE settings: image
code:

#define pin 2
bool _read = 0;

void setup() {
  Serial.begin(9600);
  pinMode(pin, INPUT_PULLUP);
}

void loop() {
  _read = digitalRead(pin);
}

schematic: literally the receiver hooked up to pin 2 with ground and 5v connected.

Try a different library: The ESP32 is a 32-bit processor! (INT is 32 bit wide)

ESP32 and Infrared receiver example | ESP32 Learning

Seems like the website is broken. Images don't display. Big thanks still, the code snippet at the bottom works perfectly

ESP32 and Infrared receiver example _ ESP32 Learning.pdf (551.9 KB)

GitHub - Arduino-IRremote/Arduino-IRremote: Infrared remote library for Arduino: send and receive infrared signals with multiple protocols

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