luni64 / TeensyStep4

MIT License
17 stars 15 forks source link

Driving more than 4 steppers ? #16

Open jkozniewski opened 6 months ago

jkozniewski commented 6 months ago

Hi,

Is it possible to drive more than 4 stepper motors with this library ? It seems that as soon as I try to drive more than 4 steppers it just stops working.

I have Stepper objects defined like this:

Stepper s1(STEP_PIN, DIR_PIN);
Stepper s2(2,3);
Stepper s3(4,5);
Stepper s4(6,7);
Stepper s5(10,11);

and then just initiating async move:

TS4::begin();

  s1.setMaxSpeed(4000);
  s1.setAcceleration(1000);
  s1.moveAbsAsync(-10000);

  s2.setMaxSpeed(4000);
  s2.setAcceleration(1000);
  s2.moveAbsAsync(-10000);

  s3.setMaxSpeed(4000);
  s3.setAcceleration(1000);
  s3.moveAbsAsync(-10000);

  s4.setMaxSpeed(4000);
  s4.setAcceleration(1000);
  s4.moveAbsAsync(-10000);

  // s5.setMaxSpeed(4000);
  // s5.setAcceleration(1000);
  // s5.moveAbsAsync(-10000);

As soon as I uncomment s5 stepper code the one and only stepper that I have physically hooked up stops moving and the teensy hangs (there are no messages in Serial Monitor, while with < 5 I'm printing current position of s1).

Cheers.