Reconfiguring Automatic Chicken Coop door, I could really use some help here.

Hello,
Well I built a automatic chicken coop door utilizing outside help with Arduino code but the cheap reed switches have shown to be totally unreliable. So, I'm changing things up now and am going to use a 16 in stroke Linear Actuator. I have code I can use, problem is removing the reed switches 1 and 2 (pin positions 2 and 4 on UNO) leave me with a question mark as to what I use for signaling, "high and low" of my actuator. Can somebody help me out? Please see my code and work your magic because I am a novice at code and understand some, but not much.....

What I would like to happen is, as the sun light is detected, the Sensor triggers the H-Bridge to trigger the linear actuator to open the door and the same for when the light diminishes and the program closes the door.
I have looked all over the place to find some comparable code but I have been unsuccessful. I Googled and searched form's all over the place to no avail. Can someone please help me out?

I am using:
Arduino Uno
L298N H - Bridge motor controller.
DS3231 - Real Time Clock.
6 x 24 LCD (I am not sure is working correctly)
Photosensor

https://www.element14.com/community/external-link.jspa?url=http%3A%2F%2Fpastebin.com%2F8LaQA61j

Instructables have a bad rep, but you may want to take a look at http://www.instructables.com/id/Arduino-Modules-L298N-Dual-H-Bridge-Motor-Controll/

Also try Googling.

What is your question exactly? You didn't post any code (please use code tags!). Nobody of any repute is going to dig around in wastebin for you.

aarg:
What is your question exactly? You didn't post any code (please use code tags!). Nobody of any repute is going to dig around in wastebin for you.

It's not a wastebin. It's a pastebin.
Apparently he posted his code in the element14 aka Newark forum.

the cheap reed switches have shown to be totally unreliable. So, I'm changing things up now and am going to use a 16 in stroke Linear Actuator.

I don't see the connection between having unreliable end of travel limit switches and the actuation mechanism.

problem is removing the reed switches 1 and 2 (pin positions 2 and 4 on UNO) leave me with a question mark as to what I use for signaling, "high and low" of my actuator.

If you have magnets actuating the reed switches, perhaps it is a simple change to hall sensors. You can also consider using lever arm contact microswitches or optical sensors which get blocked.

I think the code can be left as is, and just find different switches, or figure out the root cause of the reed switch unreliabiltiy.

Reed switches are extremely reliable, as long as you do not pass too much current through the contacts and debounce properly (if required).

However, microswitches with rollers may be easier to use for door open/closed states, and are also extremely reliable.

I'm sorry, I am not an expert at all at this kind of stuff. I wanted to do this project but do not understand code. I am trying to learn. A gentlemen was helping with my initial code on the instructables forum. He was allot of help and got my coop door running. I had the roller switches but they wouldn't detect the door open all the time and my motor would blow past the switch and wind up the rope very tight.
I want to switch to the Linear Actuator. I bought it, now I'm going to use it!
All I wish to know is how to tell the code I am looking for High and low on the Actuator. I am unsure how to do this.
I'm sorry about the link. I didn't see it was directing you back to the instructable forum and not to the pastbin. How do you pass code back and forth here?

"All I wish to know is how to tell the code I am looking for High and low on the Actuator."
You bought it!

How do you pass code back and forth here?

Please read the "How to use this forum" post, where this is clearly described.

All I wish to know is how to tell the code I am looking for High and low on the Actuator.

Do you have a link to the actuator? Does it have built in limit switches?

WOW, there sure are some condescending people here. I came here for help, not to be ripped apart. It's like being on YouTube with all the trolls. If you do not wish to help me fine, leave your comments to yourself please.

Thank you Cattledog,
I have a Linear Actuator with built in limit switches.
I created a new Pastbin attachment. I hope I did this correctly.

updated_automatic_coop_door___linear_actuator.txt (11.3 KB)

Nealbopper:
WOW, there sure are some condescending people here. I came here for help, not to be ripped apart. It's like being on YouTube with all the trolls. If you do not wish to help me fine, leave your comments to yourself please.

Thank you Cattledog,
I have a Linear Actuator with built in limit switches.
I created a new Pastbin attachment. I hope I did this correctly.

Please read the sticky at the top which explains how to correctly paste your code!

WOW, there sure are some condescending people here. I came here for help, not to be ripped apart. It's like being on YouTube with all the trolls. If you do not wish to help me fine, leave your comments to yourself please.

If you are too lazy to read a couple of simple rules and make things easier for yourself and us, please look for help elsewhere.

I have a Linear Actuator with built in limit switches.

One of the switches will be for the limit extended and the limit closed. The data sheet (or a multimeter if there is no documentation) will tell you if they are normally closed or normally open.

I don't see any reason why they would not be a direct replacement for your external limit switches with the correct logic. I'm not sure there would be any code changes required. Reading a switch with digitalRead() and responding to the 0 or 1 should be independent of the type of switch.

Perhaps I'm missing something that makes this more complicated? What problems are you have with the internal limit switches?

Usually when people buy an item for a design they make sure they know and confirm how to interface to it first.
Of importance is type and operating voltage, electrical and mechanical interface needs and in this case how you control the device.
Only then should a purchase be considered.

Picking an item based on price and saying the internet will provide is being a bit naive.

You should follow the posting requirements for forums you join.

I suggest you add manual override circuitry to your design so things can be operated without the controller.

Also, incorporate a mechanical disconnect when power is not available.

.

This was offered in a previous chicken coop design:

WOW, I'm speechless! Have a great evening.