console.log() command doesn't work if device is working stanalone.
It's in the FAQ/Troubleshooting. It'll work, but only when the device isn't powered from your PC. If it's powered from the PC you need to open a terminal app first.
it needs to wait a little bit before doing next step
Instead of adding a delay, just change var stepInterval = setInterval(doStep, 1); to var stepInterval = setInterval(doStep, 2);. Try different numbers to see what works.
Leds allways on.
I'd really, really suggest that you try changing the polarity of the signals:
Personally, I think that the motor driver might be inverting the outputs (so 0 is 1 and 1 is 0). That would mean that you spend a lot of time with 3 coils on (two of which will be 'fighting' each other as they're opposite).
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.
It's in the FAQ/Troubleshooting. It'll work, but only when the device isn't powered from your PC. If it's powered from the PC you need to open a terminal app first.
Instead of adding a delay, just change
var stepInterval = setInterval(doStep, 1);
tovar stepInterval = setInterval(doStep, 2);
. Try different numbers to see what works.I'd really, really suggest that you try changing the polarity of the signals:
Personally, I think that the motor driver might be inverting the outputs (so 0 is 1 and 1 is 0). That would mean that you spend a lot of time with 3 coils on (two of which will be 'fighting' each other as they're opposite).