Hello everyone, I have a project related to IR LEDs. I have implemented signal transmission through IR LEDs, and my transmitting IR LED is working fine. However, when it comes to receiving with 4 IR LEDs, I encounter the error: (76442) gptimer: gptimer_start(348): timer is not enabled yet. What should I do to resolve this issue? I am using the ESP32-S2 Mini and the VS1838B as the IR receiver. Apologies for my poor English, and thank you for using ChatGPT to help me with the translation. Thank you.
#include <IRL_Decode.h>
#include <IRL_Hash.h>
#include <IRL_Keycodes.h>
#include <IRL_Nec.h>
#include <IRL_NecAPI.h>
#include <IRL_Panasonic.h>
#include <IRL_Platform.h>
#include <IRL_Protocol.h>
#include <IRL_Receive.h>
#include <IRL_Time.h>
#include <IRLremote.h>
#include <Arduino.h>
#include <IRremote.hpp>
#define RECEIVERS 4 // Số lượng cảm biến
const uint8_t IR_RECEIVE_PIN[] = {3, 4, 5, 6}; // Chân IR receivers
decode_results results;
void setup() {
Serial.begin(115200,SERIAL_8N1,16,18);
Serial.println("IR Receiver Ready");
// Khởi tạo tất cả các chân cảm biến làm đầu vào
for (uint8_t i = 0; i < RECEIVERS; i++) {
pinMode(IR_RECEIVE_PIN[i], INPUT);
}
// Bắt đầu nhận trên chân đầu tiên
IrReceiver.begin(IR_RECEIVE_PIN[0]);
IrReceiver.enableIRIn();
Serial.println("IR Receiver Ready");
}
void loop() {
for (uint8_t i = 0; i < RECEIVERS; i++) {
IrReceiver.begin(IR_RECEIVE_PIN[i]);
if (IrReceiver.decode()) {
Serial.print("Receiver ");
Serial.print(i);
Serial.print(": ");
Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX);
IrReceiver.resume(); // Tiếp tục nhận tín hiệu
}
delay(200);
}
delay(100); // Đợi trước khi chuyển sang receiver tiếp theo
}