how can I take inputs from motors and record it?

Hello, I have no clue what I'm doing. I got my first microcontroller today and I have an issue. I've watched many tutorials and none of them seem to go over this topic. I need to receive an input from a motor so the arduino can remember the number of rotations and when to do it. so I can replay it again. So if I wind a motor 3 times how can I save the program so I can push a button and make it do those rotations. Any help would be very appreciated. Thanks!

You should be able to get some ideas from this video.

Is there any way I can do this with non-servo motors like a brushed motor?

hellohi23:
Is there any way I can do this with non-servo motors like a brushed motor?

I believe the common servo motors are brushed motors, they're just encapsulated with gearing and a circuit which drives the motor, which in turn rotates an internal potentiometer, to match the controller signal with the potentiometer wiper voltage.

These also usually have a limited arc of rotation enforced by a physical stop. If you want continuous rotation that's another subject - which I don't feel qualified to address.

Not meaning to discourage but, I would offer that based on your admission of "I have no clue what I'm doing." you have a lot of reading and learning ahead of you to make this project a reality.

Here's a list of a few things you'll need under your belt - switch debouncing & using millis() for timing, arrays, and quadrature encoders.

hellohi23:
Is there any way I can do this with non-servo motors like a brushed motor?

Well you could integrate the voltage over time for a crude estimate of angle. But only if no
current flows. So if you want to measure rotation whilst driving the motor you'll have a harder
time as the current and winding resistance have to be added to the model (and the temperature
of the windings affects their resistance too).

I know that servos are brushed motors with sensors and gears. But I just want to be able to control it with out a pot and i need it to go faster than 50 rpm. And I don't care if I'm under experienced. This is how I'll get experienced. I'm going to watch 50 hours of youtube videos to get this project done if I have to.

Isn't this what encoders do? When you turn an encoder you can count the "clicks" so you know how far you've gone.

So you can "record" the clicks the first time and "playback" the next time.

In theory anyway, and assuming your motor has an encoder or you can attach one somehow. The problem comes when you are almost at the target value and you'll need some kind of control to slow the motor down for the "last few" clicks so you don't overshoot. And as far as I know, that's exactly the proportional control that happens inside a servo.