Hi, everyone, I am real new to the Arduino platform and don't have any experience with writing codes at all. Ive read some tutorials and found some sample codes on Sparkfun but its so confusing that I just don't know where to even start. I guess Ill explain what it is I am tying to do.
I have this electronic dog door that opens with a sonic collar, the problem is when my beagle "Diesel" stands in the door to smell outside/check the back yard, the collars signal doesn't register on the inside or outside receiver. The door works when a pet is walking to the door on either side. But when a pet stands in the middle the door closes as the sonic signal doesn't reach the receiver. It has an auto retract so it doesn't pin the pet down, but as he stands there it goes up and down hitting his head/back like every second. So I want to use a beam break sensor on the sides of the door (arrows in fist pic). Space is super limited, so I got a Mini Leonardo Pro Micro with the atmega32u4 chip 5v/16mHz. Like this: https://www.sparkfun.com/products/12640 This is the Emitter I bought and this is the Receiver
The way I want this to function is when the beam from the Emitter to the Receiver is broke by "Diesel" standing in the door opening, for the Arduino to see this and in turn close the contacts/make continuity on the open button (shown in the second pic) which in turn will keep the door up as long as that beam is broke. When the IR beam is connected (Diesel goes forward through the door, or backs up) the Open button's contacts are "opened", and the door will lower and act as it does normally. I can psychically stand there and hold the button down and the door stays up, so I know that part will work. When the button is released the door lowers. I just need to duplicate the action of holding the button down with the Arduino. I hope this makes sense.
I plan on using a small SolidStateRelay like THIS, from a 5v output from the Pro Micro through a 820Ω resistor it should activate this SSR in turn closing the contacts on the tactile button.
So I have pretty much the entire setup figured out, I just need help with the code to make all this happen like I described. Ive read a number of guides on writing codes for several hours and I just don't get it. Its so freakin confusing.
Thanks for your time, and any info would be greatly appreciated.
Jeremy