I'm new to ESP32 and Arduino. I want to Transmit IR signals using an ESP32 Wroom32 microcontroller. My IR transmitter has 3 pins S + -. I have placed S to pin 26 + to 3.3v and - to Ground of the ESP32. My IRremote library version is 4.4.1
I'm using the following code but its not working. I can find what's wrong. Can somebody please help?
Do you have a part number or data sheet for it? Every IR transmitter I have used look like LEDs and have only 2 pins. All the IR receivers that I have used have 3 pins and look like this:
"You're missing some important code. You need to use Serial.begin(9600); before you can print any messages to the console. I’m not familiar with the specific library you’re using, but generally, you also need to declare the pin as an output using pinMode(pinNumber, OUTPUT);. Add that, and you should start seeing some results.
Get a copy of the Arduino Cookbook it will become your best aid.
I've made plenty of silly mistakes in my time coding. The hardest ones to spot are my own silly mistakes.
The library you are using should have examples like this:
The usual path is to run the IReceiveDemo or IReceiveDump, to get the code from the remote you want to emulate. Then copy IRsendDemo and edit it to send the code you want to send (that you found from IReceiveDump).