-1

For Example:

move.stepper(90°)  #stepper now points to the east
time.sleep(1)
move.stepper(180°) #stepper now points to the south
time.sleep(1)
move.stepper(263°) #stepper now pointing to 263°

I couldn't find anything like that. Is that even possible? I hope you guys understand want my question is, I apologize for my bad english.

3
  • 3
    Yes. But the question has nothing to do with the Raspberry Pi.
    – joan
    Feb 28 at 11:43
  • That's great, but how? Oh and I first asked on stack overflow, then somebody there told me I should ask here, so that's why I asked here.
    – Lucas
    Feb 28 at 12:24
  • 2
    You need to study how steppers work in general and how your particular stepper motor works. You need to work out how you move your stepper one step forward and backwards. You need to write code which moves the stepper x steps forward and x steps backward. You need to find a way of homing your stepper to a known position. When you have done that you will be able to ask a detailed Pi specific question (although I expect you'll have been able to work out the answer yourself by that time).
    – joan
    Feb 28 at 12:48
0

The stepper motor is an incremental device. That is to say you can only command it to go in a desired direction for a desired number of steps, where each step is a fixed angular displacement, often 1.8 deg and sometimes 0.9 deg.

So it is easy to go to say a EAST position, where is relative to your last position. To go to a desired absolute angle you need to start from a known position and move incrementally from that.

It is common to have an absolute ZERO deg position which you establish with an external sensor such as a microswitch etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.