Hello Arduino family, I have been working on part of the ventilator project which requires making the motor shaft move back and forth at a particular angle. For example, if I set the angle at 30 degrees then the motor shaft should go to 30 degrees and move back to 0 degrees. The motor I am using is in this link https://www.andymark.com/products/pg188-gearmotor-with-0-5-in-hex-output. Together with it, I am using solo 30A Roboclaw to read encoder pulse and control the motor. The Roboclaw I am using can be found at this link Roboclaw Solo 30A, 34VDC Motor Controller
My progress so far:
I am able to motor move back and forth using delay();
I am able to get speed and encoder pulse from the motor;
Hopefully this isn't too late, but I agree with @billz1 to consider servo motors that will have already solved the positioning issue. There are analog hobby servos and then more expensive digital servos that can receive exact position commands from the Arduino over serial.
I've worked with these servos before and they come in a large range of sizes. Would something like that work in a larger size?