which pin is used to send the infrared signal to the ESP32? #1556
-
Tell me which pin can be used on ESP 32, I tried different commands are not sent, I use the latest version of the library. #include <Arduino.h>
#include <IRremoteESP8266.h>
#include <IRsend.h>
const uint16_t kIrLed = 18; // ESP8266 GPIO pin to use. Recommended: 4 (D2).
IRsend irsend(kIrLed); // Set the GPIO to be used to sending the message.
void setup() {
irsend.begin();
Serial.begin(115200);
}
void loop() {
Serial.println("Sony");
irsend.sendSony(0xa8305E8, 24, 1); // 12 bits & 2 repeats
delay(2000);
} |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
You've told it to use GPIO18. Look at https://www.google.com/search?q=ESP32+pinout&oq=ESP32+pinout and it should tell you where and what that pin does. |
Beta Was this translation helpful? Give feedback.
-
I just noticed this in your changed code. irsend.sendSony(0xA8305E8, 24, 2); Also, how sure are you that it is a I suggest you read through the code here: https://github.com/crankyoldgit/IRremoteESP8266/blob/master/src/ir_Sony.cpp There is also a If you omit the |
Beta Was this translation helpful? Give feedback.
-
thank you to everyone who responded! It worked on pin 4, it's just that it is not correctly marked on the board, the board is marked incorrectly. Fixed the problem by going through all the ports |
Beta Was this translation helpful? Give feedback.
You've told it to use GPIO18.
Look at https://www.google.com/search?q=ESP32+pinout&oq=ESP32+pinout and it should tell you where and what that pin does.