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.
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=KPR1Zt37GPE
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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
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-Stepper-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=KPR1Zt37GPE