Hello everyone, I'm currently working with IR Remote, IR receiver, and stepper motor.
My project is to control the spin of the stepper motor when I press a button e.g., ( button 1 = clockwise and button 2 = counter-clockwise) and I want the spin to be continuous every time I press the button. The problem I am facing now is that using the switch case statement, whenever I press the first button it works but if I want to press the second button to do the counter-clockwise movement, it does not trigger. Anyone can help me with this?
Yes, I've done this awhile ago, but the problem was the spin of the motor is not continuous since the stepper motor I'm using can only do 256 steps per rev if it is greater than that it overheats and does not spin.
overheating is not a problem of speed or number of steps.
It is a problem of a too high current.
With the current adjusted to the stepmotors specs you can drive the steppermotors 24 hours per day /7 days a week for a hundred years
So please post the details of your project.
Datasheets of your stepper-motor and the stepper-driver
Be the change you want to see in the world
best regards Stefan
if your code read the buttons directly, i would have said the code should drive the motor while the button is pressed. instead, your talking about buttons on some other device that repeatedly sends an IR code while the button is pressed
so whenever you receive a code you can drive the motor some number of steps
or you can capture a timestamp whenever you receive a code and drive the motor until some timeout-period after not receiving the code