We need help making an automatic cat door.
Unfortunately, my program does not. I don’t know where it goes wrong.
What I’m trying to make: I’m an automatic door for the cats. At night the cats are not allowed to go inside and outside. This is controlled with a light transistor, when it Shimmers, the door will be locked. In the morning the door needs to be unlocked. The door is locked with 2 metal discs (on 2 axles with 2 mounted servo motors) that a quarter turn, and so the door block. Also, I would like to 4 other manual modes. (these are not depending on the light in the air) :
the first “IN”: the cats may only inside (1e servo under 180 °, the other under 1 °)
the second “OUT”: the cats may only go out (1st servo under 1 °, the other under 180 °)
the third “INOUT”: the cats are allowed in and out (the two servos engines under 1 °)
the fourth “CLOSE” : door locked (the two servos engines under 180 °) to the function to select I use a rotary switch).
thanks for your time!
Simon and Thomas
de_deur.ino (14.1 KB)