Search results

  1. C

    New Stepper Motor Library

    I assume you’ve tried “multistepper” part of “accelstepper”? One of the main reasons for teensystep is to apply acceleration to what multistepper does. If you don’t want acceleration just use multistepper. Another reason for teensystep is for high speed stepper motors. You can’t get high speed...
  2. C

    New Stepper Motor Library

    Also, you need to set the acceleration to a very large number to get little to no acceleration. Not zero.
  3. C

    New Stepper Motor Library

    I’m not sure I fully understand what you’re after. Part of what you say is really easy, and then I get confused by the rest. The first bit sounds like you’re setting a bunch of x y coordinates and you then want to move between each pair of coordinates, moving to the next set when you’ve...
  4. C

    New Stepper Motor Library

    Fortunately I'm able to work around it by testing if the incoming joystick move is negative or positive and change the rotateAsync to a negative speed, and inverting all overrideSpeed input.
  5. C

    New Stepper Motor Library

    Hi Luni, I think can finially can reproduce a bug. Using this code, when starting a negative overrideSpeed, the motor will move positive first. #include "Arduino.h" #include "teensystep4.h" using namespace TS4; Stepper s1(19, 18); int ms = 5333; //max speed int a = 4000; // acc elapsedMillis...
  6. C

    New Stepper Motor Library

    Hi Luni, I'm coming back to this project and I'm having issues and I can't figure out why. I'm using the current library from https://github.com/luni64/TeensyStep4 With this code the motor does not turn as expected. I think higher speeds don't have this problem but I'm working with very low...
  7. C

    New Stepper Motor Library

    Ah good!! I’m glad it was a simple fix and you’re up and working :)
  8. C

    New Stepper Motor Library

    Hi Bill, I've not found teensystep4 to clash with any of the serial ports. I run teensystep4 with 3 steppers and 3 serial ports fine. No clashing. You shouldn't have to add those IMXRT lines to the TMR.h library either. Maybe that's what's causing the issue. If you can link me to your code /...
  9. C

    New Stepper Motor Library

    This seems to fix the -ve factor issue for group rotates. Feels like another hack, but it seems to work for now. void StepperBase::doStep() { digitalWriteFast(stepPin, HIGH); s += 1; pos += dir; StepperBase* stepper = next; while (stepper !=...
  10. C

    New Stepper Motor Library

    @luni Everything seems to be working great with the latest commit... Apart from, when doing a group rotate, and a -ve overrideSpeed, only the first motor changes direction, the other 2 keep going in the same direction. Test code: #include "Arduino.h" #include "teensystep4.h" using namespace...
  11. C

    New Stepper Motor Library

    @luni Here's a little proof that things are working fine. Teensy 3.2 & Teensy 4.0 side by side. https://youtu.be/xohfqF01irU And I know I haven't said it enough already, THANK YOU for all your work on this. I'm forever grateful!
  12. C

    New Stepper Motor Library

    I know you enjoy a plot. With the current bugfix you can see the overrideSpeed works multiple times, but with the code below you can see the issue of moving 1 motor after a group-move has finished. The stepper group that was created affects the rotateAsync. #include "Arduino.h" #include...
  13. C

    New Stepper Motor Library

    ok, so I think I've bodge fixed both issues for now. This checks what mode we're in before doing steps, otherwise when doing an overrideSpeed it will cycle through the StepperBase object created when doing a group move. void StepperBase::doStep() { digitalWriteFast(stepPin, HIGH)...
  14. C

    New Stepper Motor Library

    Successive overrideSpeed calls seem fine with my code at the moment. EDIT:: I new I would speak too soon!! Corrected with new findings. 1st issue, -- fixed by (but probably not correctly fixed) void StepperBase::rotISR() { mode = mode_t::rotate; // ADDED to keep mode in...
  15. C

    New Stepper Motor Library

    Correction! There was a bug in my code. The only thing I've adjusted from your bugfix branch is to comment out all serial print commands. It's currently working smooth as butter! I'll do a longer test to see how stable it is.
  16. C

    New Stepper Motor Library

    I've just tried the bugfix branch and the slow speed issue seems to be gone. I had to uncomment the line in startStopping again to stop the motors in overrideSpeed from being unresponsive after their first move. I also had to comment out the serial.print in TMR.h otherwise using 2 motors at...
  17. C

    New Stepper Motor Library

    Great! I've been able to keep the overrideSpeed working by uncommenting this line in startStopping: if (!isMoving) return; Overall I've found the rotateAsync with overrideSpeed on TS4 to me much slower than TS. I've had to *100 the rotateAsync speed for it to be similar. But the "group...
  18. C

    New Stepper Motor Library

    I've been running more tests. Using rotateAsync and overrideSpeed, speeds between 0 and 100 are not linear. Specifically speed = 71 is significantly faster than speed = 100. s2.rotateAsync(100); s2.overrideSpeed(0.71); I've plotted a graph using Arduino IDE serial plotter with the following...
  19. C

    New Stepper Motor Library

    https://youtu.be/jVCTMr_b2xM Here's a video of it working but only if I don't stop moving all axis for about a second. If I do stop for a full second, all rotateAsync stop working, which you can see from 0:52 in the video. You can also see that the Teensy4 hasn't hung as I've set the built in...
  20. C

    New Stepper Motor Library

    ok good, glad it's not me :) In my tests so far if the time between changing overrideSpeed is short enough, it'll keep working and I can keep the motors moving at different speeds and in different directions. I haven't tested very long, but I'd go so far as to say, it works indefinitely. It's...
  21. C

    New Stepper Motor Library

    Hi luni, No worries, I appreciate that. No hurry. I'm enjoying figuring it out. Like I say, I've been using this with TeensyStep for that past few years with much success, I just need to modify my code to use your new version. What I've been using is rotateAsync with overrideSpeed to use a...
  22. C

    New Stepper Motor Library

    I'll let you know my findings whether it helps someone else or someone can help me. So far I've found you can have more than one rotateAsync and overrideSpeed, it appears to be the stopAsync which stops not only the assigned rotateAsync but stops ALL rotateAsync motors, and stops you from...
  23. C

    New Stepper Motor Library

    Hi luni, thanks for your work on TeensyStep4. You may remember a few years ago I assisted in getting the multi-stepper move to use the fastest speed instead of the slowest. I've just started transitioning my camera pan / tilt / slide mount from Teensy3.2 to Teensy4.0 that used TeensyStep. I've...
Back
Top