0

How easy is it to create a code using an RTC to rotate the stepper motor one way at a specific time and back the other way at a specific time? and that time being charged different months of the year. how would I go about this?

I want to make an automatic chicken door, to open in the morning and close at night.

Thanks

4
  • please do not ask opinion based questions .. those are off topic here ... anyway, what is the point of asking how easy something is? ... how is an answer like somewhat easy even useful?
    – jsotola
    Mar 12, 2021 at 15:36
  • 1
    develop the project in sections .... start with rotating the stepper to desired positions ... next, add code tbat rotates the stepper when a button is pressed ... next, replace button control with time based control
    – jsotola
    Mar 12, 2021 at 15:37
  • This question is difficult to answer because it depends on your skills. For an absolute beginner it can be complicated, for someone with a little more experience it will be easy.
    – PimV
    Mar 17, 2021 at 11:35
  • code is finite, and better yet logical. should be "easy" compared to the hardware portion where the possibilities are nigh infinite and chaotic. If hardware is done, tested, and reliable, then just loop over: reading rtc (1), deciding on an action such as deep sleep or running motor to change door (2), and performing the action (3). Break each step down into simpler actions based on searches, but if you properly tested the hardware already, you should have code to break up and reuse from when you did that.
    – Abel
    Dec 14, 2021 at 1:03

1 Answer 1

-1

I am assuming that you want to make a clock. To do that you need to find a gear ratio where 1 revolution of the motor equals 60 seconds, and then make the gear ratios for the minutes and horse from that. Then you can use the RTC to spin the motor by 6 degrees every second. If you are not making a clock, please be more descriptive.

1
  • Spend some time searching the web, I have seen several solutions one of them even did a chicken door.
    – Gil
    Dec 9, 2022 at 2:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.