You are not logged in.

#1 Re: Help and Support » X-direction Stepper Motor » 2016-08-17 12:09:43

Yes

this is the code for forward X-direction :

from gpiozero import LED
from time import sleep

pulse=LED(2)
direction=LED(3)

direction.on()
pulse.off()

pulses=0

while(pulses < 50):
    pulse.on()
    sleep(0.004)
    pulse.off()
    sleep(0.004)
    pulse.on()
    sleep(0.004)
    pulse.off()
    sleep(0.004)
    pulses= pulses+1

and the same for backward X-direction except that the direction is reversed

#2 Help and Support » X-direction Stepper Motor » 2016-08-16 14:54:44

Elnagdy
Replies: 12

Hello,

I am using another stepper motor in my printer to move the vat in X-direction during printing. I want the vat to move in one direction immediately before the build platform moves upward and return back before the build platform moves again downward. I wrote two python codes for each movement of the X-direction stepper motor and called one under "Syscall Before Each Layer" and called the other under "Syscall After Each Layer", but it didn't work with the sequence I need. I am not using arduino; only raspberry pi. I would appreciate any advice.

Board footer

Powered by FluxBB