***Edited to indicate RF controller instead of IR from initial version of post
Hi everyone,
I am a newbie in terms of using Arduino, coding, and electronics; hoping you can help me with a small project for a photo booth trigger using Duinotech Uno R3 and the included RF remote controller (ZY108-V2.1) of the equipment (rotating motor) I bought. I am currently prototyping on a bread board using jumper cables, LEDs, optocoupler (4N25) and resistors. The prototype and codes are based of a few tutorial videos I’ve watch and copied the setup there, i.e. resistor values, use of optocoupler, wiring, etc. The LED on the breadboard serves as a visual cue to indicate connectivity. Please check my set-up below and teach (or send me links) me how to fix the issue. I would also appreciate any alternative set-ups, feedback on improvements, or any type of suggestions or comments.
Goal of the project:
When the input button is pressed, trigger the on/off button on the RF remote to turn the equipment on. After a 5 second delay, trigger the same on/off button to turn the equipment off. The RF remote will be about 3-5m away from the equipment.
The Issue:
When the button is pressed, the LED on the breadboard blinks once, then once again after a 5-second delay. Same goes with blinking the LED on the RF Remote control, it blinks the same time as the one on the breadboard. The issue is that the RF does not seem to send the signal to the equipment. Manually pressing this button makes the RF Remote control's LED blink and turn the equipment on/off.
Here are the schematics:
Here is a picture of the RF Remote control, I am using a jumper cable to connect the 2 contacts on the left side of the top button (on/off button):
Considerations:
There are 2 RF remote controllers that came with the equipment so no issues with soldering wires onto the button’s contact points to connect to the breadboard.
Here is my code:
void setup(){ //set-up pins as input and output
pinMode(2,OUTPUT); //green
pinMode(12,INPUT); //orange wire
}
void loop(){
if(digitalRead(12) == HIGH){ //on button press
digitalWrite(2,HIGH); //turn green LED on, trigger RF Button
delay(100); //delay before turning off
digitalWrite(2,LOW); //green off
delay(5000); //wait 5000 ms
digitalWrite(2,HIGH); //turn green LED on, trigger RF Button
delay(100); //LED remain on for 100 ms
}
else{ //button not pressed, LED off
digitalWrite(2,LOW); //green off
}
}

