Hi guys, i am struggling to understand why my stepper motor isn't moving,
below is the code, it should take the mapped value and then use it to set the position and speed of the motor and then run the motor
AccelStepper and delay() don't really fit together well.
You must put the stepper2.run() statement out of the if (stepper2.distanceToGo() == 0) block.
stepper2.run() must be called as often as possible, because this is the call that creates the step pulses.
What Arduino are you using?
A 'standard' Arduino with ATmega processor cannot run the stepper that fast (with Accelstepper).
How will you define speed and position with one value? And how should the value define the position? Absolutely? relative?
Im not sure the best solution for this, i think it will need to be an absolute, and well i can define the speed numerically and just use the map return for the position?
the project is an xy plotter but where the stepper motors are progammed to respond to levels of sound from the analogue sensor, i just need some sort of movement for the uni hand in haha