You are reading a single comment by @fobus and its replies. Click here to read the full conversation.
  • Hello,

    I'm using this code to run my step motor :

    var step = 0;
    var steps = [0b0001,0b0010,0b0100,0b1000];
    var stepperPins = [A3,A2,B10,B11]; // Change these to pins for your motor driver
    
    function doStep() {
     step++;
     digitalWrite(stepperPins, steps[step % steps.length]);
    }
    var stepInterval = setInterval(doStep, 200);
    

    I'm using 28BYJ-48 – 5V stepper motor and controller : http://robocraft.ru/files/datasheet/28BY­J-48.pdf

    But it works so slow, approximately 0.5RPM. When I set interval to 30ms it is a little bit faster, but approximately 1RPM. I have tried with 5V and 9V input.

    What I am doing wrong?

About

Avatar for fobus @fobus started