• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    Asynchronous stepper motor library

    Hardware
    2
    2
    79
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      otto22 last edited by

      I have an arduino mega that's connected to two stepper motors.  Each stepper motor has one stop/limit switch that would indicate the end of the travel distance.  I'm using "AccelStepper" library to control the motors.  I'm also using the "Eventually" event-based lib to do perform some action when an event occurs. 

      Everything works great in serial fashion. But I need to have a few things run at the same time. The two stepper motors, for example. The issue that I have is AccelStepper is blocking meaning that once I call "runToPosition" function call, nothing else happens unless and until the function returns.  

      I looked at "Metro" and "Chrono" packages but again since the "runToPosition" is a blocking function call, everything comes to the halt until the function call returns.

      Of course, one thing I can do is move each motor a few degrees in a loop with AccelStepper lib or just pulsing it.  But I was wondering if there is any stepper motor libs that are asynchronous?  Something like fire-and-forget.  Thanks all.

      Opportunity knocks but once. https://www.oyostepper.de/

      agentsimon2 1 Reply Last reply Reply Quote 0
      • agentsimon2
        agentsimon2 @otto22 last edited by

        @otto22 Hi. This might help https://forum.arduino.cc/t/2-s...

        Running: Victus HP 16 AMD Ryzen 5 with NVIDIA RTX3050 Ti | Windows 114 | located in Da Nang, Vietnam.
        Github https://github.com/agentsimon

        1 Reply Last reply Reply Quote 1
        • First post
          Last post