Hi everyone, newbie here, if I've posted this in the wrong spot please let me know where to post these questions.
I've read a lot of stuff on getting the Arduino to control the step motor no problem. Does anyone have a sketch or data on how to READ() data from the step motor and record it.
If I were to have two stepper motors connected to a robot and I pushed the robot along the floor it would move the motors, the Arduino would record the movement and then I would be able to replicate the same motion by playing it back.
Any help would be awesome.
An unpowered stepping motor will act as a pulse generator when rotated. So just treat that like you would any other source of pulses. You can constantly pole for them or perhaps better still generate an interrupt and let the interrupt service routine do the counting. In that way you would be sure not to miss any.
However, the trick here is to make it switchable between powered and unpowered without that switching affecting the pulses coming from the motor so you are better off using FETs to power the motor and capacitively couple the motor to the input.
I once made a force feed back paddle control out of a stepping motor in the late 80s. As you turned it, the pulses moved a paddle on the screen and when you hit the ball the coils were energised giving you a feed back kick as if you had hit the ball. It was quite effective. However I think the problem with your idea is that you might get slippage between the wheels and the floor when you move it by hand.