The good people at the StackExchange EE forum could not (as of this date) answer this question, so I'm wondering if Raspberry Pi is better? By way of background: https://electronics.stackexchange.com/questions/217117/linear-actuator-question-off-the-shelf-design-possible
FYI, I'm a EE (never practiced) who took assembly language lessons way back when and also programs using Visual Studio languages, not that it really matters.
In brief, what combination of hardware and software in R.Pi can extend a linear actuator (LA) rod (until it hits its limit or a limit switch, or, perhaps power ON for a few seconds until X distance traversed or the limit switch that comes with most LA's is tripped), and, upon a second command, retract the LA rod? Assume the Linear Actuator is for light use, axial load, 10 kg weight supported (and must be maintained while the LA is turned OFF, which I think is a default configuration in that most LA's will do this, that is, not move unless powered ON) and the "duty cycle" (time the linear is powered ON and OFF) is every four hours.
In short, here is the operation desired for the LA (Linear Actuator): (1) power on the LA, (2) have the LA rod go X inches (typically four inches / 10 cm), Y seconds, or until the LA limit switch is tripped by the rod, (3) power off the LA (and have it hold the load of 10 kg force / 22 lbsf)--btw powering off the LA is not a requirement of the design, just common sense, so this step is optional), and (4) upon a passage of time of four hours, power on the LA and/or have the LA retract the rod to its starting position, then repeat this cycle after another command (that is, the LA rod stays at the starting position for four hours, then the cycle repeats).
Since a LA is nothing more than a DC or AC motor, I'll also accept and will be pleased if anybody could optionally answer this just for a DC/AC motor.
For what it's worth, this project is for a not-for-profit plan to raise chickens for a developing country in southeast Asia.
I appreciate any answers.