I don't know whether the stepper library actually supports you telling it "only take one step,"
myStepper.step(1); Serial.print("steps:" ); Serial.println(stepCount); stepCount++;
Thanks,my question is more of like the third point,i still havent yet figured it out,so I am asking,sorry if this is a stupid question.
- initialize a variable saying "motor is at position 0" on start-up.- For each step it takes in the "forward" direction, add one to the variable.- For each step it takes in the "backward" direction, subtract one.- to control the motor, send not a direction ("forward") but a target ("37").- in the loop, if the motor value is less than the target, step forward once; if the motor value is greater than the target, step backward once; else hold.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16