You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • 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:

    digitalWrite(stepperPins[0],!(stepval&1)­);
    digitalWrite(stepperPins[1],!(stepval&2)­);
    digitalWrite(stepperPins[2],!(stepval&4)­);
    digitalWrite(stepperPins[3],!(stepval&8)­);
    

    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).

About

Avatar for Gordon @Gordon started