I have a problem any help is appreciated!

I am a trying to make a project in which I want to execute a infrared signal only once I press the push button and keep it on hold . Further if I leave the pushbutton I require the Arduino to execute a separate infrared signal and wait until I push the button again
How can I do this ?

Hello
show your sketch posted in code tags</> and a timing diagramm showing what you sketch shall do.

Hi, @gvsumesh
Welcome to the forum.

Please read the post at the start of any forum , entitled “How to use this Forum”.
OR

So intially you have NO IR emiited.
You press the button, holding it down the IR transmits one data string/byte continuously say “A”.
When you release the button the IR transmits another different data string/byte continuously say “B”.

How do you stop the IR transmitting?
If you press the button again, does the IR transmit the “A” again?

What is the application, what is your project/

Thanks… Tom… :grinning: :+1: :coffee: :australia:

1 Like

Actually I want the following process
1- button is upressed nothing happens
2-button pressed and kept on ,this asks the Arduino to send a set of ir signals only once ,and then after transmission the first set of signal ‘A’ it has to stop while still the button is kept pressed
3-when the button is released I want to transmit another set of ir signals just once and then again wait until the button is pressed again to repeat step 2

1 Like

Hello
Do you looking for a ready designed sketch or for a guide line to code your project?

Hi, @gvsumesh

Can you please tell us your electronics, programming, arduino, hardware experience?

Can you please tell us what your application is?

Thanks… Tom… :grinning: :+1: :coffee: :australia:

I am a beginner and I am planning to make a very basic home automation project using esp8266 and Arduino nano , since I do not have a library in esp8266 to transmit or signals to control my ac , I want the esp8266 to recieve the command from my voice assistant Alexa ,and command Arduino to initiate the signal transmission using an infrared LED
So currently in my setup the esp8266 sends a high signal in d4 when I ask Alexa to turn on the AC ,I want Arduino to initiate the ir transmission sequence to turn on the AC ,when it receives a high signal from esp8266 ,later when the d4 pin of esp8266 is turned off , I want the Arduino to transmit the off signal only once and repeat this .
Thank you !!