You are reading a single comment by @fobus and its replies. Click here to read the full conversation.
  • Thanks for your answer @Gordon
    I have wired it up like this

    Stepper Pin 1-D1
    Stepper Pin 2-D2
    Stepper Pin 3-D3
    Stepper Pin 4-D4

    My new code is below, I'm changing the sequence by code

    var step = 0;
    var targetStep = 0;
    var steps = [0b0001,0b0010,0b0100,0b1000];
    var stepperPins = [D1,D3,D2,D4];
    
    function doStep() {
     step++;
     digitalWrite(stepperPins, steps[step % steps.length]);
    }
    var stepInterval = setInterval(doStep, 100);
    

    Now leds blinking in 1-3-2-4 sequence, but now it is juddering back-forward with very very small and quick steps. It is not forwarding any more.

    Also, I have forgot to tell; I'm using ULN2003 driver that shown here : http://www.instructables.com/id/BYJ48-St­epper-Motor/

    Addition :
    This step motor works really fast, please check this video. Stepper in the video works 20 times faster than mine. The same stepper and driver I have.
    http://www.youtube.com/watch?v=KPR1Zt37G­PE

About

Avatar for fobus @fobus started