IRLib2

Afternoon, a little new to this, I think I may be trying to do something that is not possible, a Friend has asked that I create a IR enabled switch to turn on/off some LED lights. So I thought that I could take an existing script that switches a relay and send the IR code instead

I have successfully captured the code from the original remote and have created a On, wait, Off script and uploaded to and Ardunio Nano, works fine.

The problem I'm having is I cannot see where the send Pin (3) is being defined, and I have gotten all mixed up and now are double guessing.

So does anyone know how to set the Send pin or if anyone know what the equivalent Pin on the Wemos, also is this possible to use a Wemos D1 Mini instead of the Ardunio Nano.

Thanks Simon

Please post your full sketch. If possible, you should always post code directly in the forum thread as text using code tags (</> button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help. If the sketch is longer than the forum will allow then it's OK to add it as an attachment. After clicking the "Reply" button, you will see an "Attachments and other settings" link.

Please always do an Auto Format (Tools > Auto Format in the Arduino IDE or Ctrl + B in the Arduino Web Editor) on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read.

When your code requires a library that's not included with the Arduino IDE please post a link (using the chain links icon on the toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries in the Arduino IDE or Libraries > Library Manager in the Arduino Web Editor) then say so and state the full name of the library.

IIRC pin 3 is defined in the IR library as the output pin because it is the oscillator pin of the timer used to generate the 38KHz carrier. I don't know if it's possible to move to a different pin/timer.

Ok here goes, the script is only modified demo code (my data), better at reading then writing the code from scratch

Libraries Used
I'm Sure I got the ESP8266 libraries when I downloaded the board
IRLib2

@Riva : Yep was coming to that conclusion :frowning:

if that is the case if i was to use a mini/nano to send the code if pin X or pin Y was to go high and use the the ESP8266 like an ESP01 to trigger the X or Y pin would that function or am I over complicating it?

Nomis8848:
Libraries Used
I'm Sure I got the ESP8266 libraries when I downloaded the board
IRLib2

@Riva : Yep was coming to that conclusion :frowning:

Sorry, from your initial message I assumed you was using the Arduino Nano and was thinking of using the ESP8266.
I don't see reference to the IRLib2 being compatible with the ESP8266.
For an IR library that works with the ESP I use this library. And for other Arduino's I have used this.

No you were correct, I started with a Nano just to capture an test send the code, then when attempting to move to the Wemos D1 Mini I, could not find the eq Send pin.

Thanks for the info on the 8266 IR lib will take a look at the weekend.

Simon