Menu

Small bug in A4998 Scatch

creativehq
2023-03-10
2023-03-19
  • creativehq

    creativehq - 2023-03-10

    Hi,

    in the myBoards.cpp for the myFP2_A4998_324 the Coil-power cannot be switched off since ENABLE is set to LOW for both power on and off. It should be HIGH for power off.

    //-----------------------------------------------------------------------
    // void driverboard->set_motor_power(bool);
    // turn coil power on, turn coil power off
    //-----------------------------------------------------------------------
    void DriverBoard::set_motor_power(bool state)
    {
    if ( state == true )
    {
    // power on
    digitalWrite(A4998ENABLE, LOW);
    delay(1); // need to wait 1ms before driver chip is ready for stepping
    }
    else
    {
    // power off
    digitalWrite(A4998ENABLE, LOW);
    }
    }

    Kind regards,

    Nikolas

     
    • brownrb

      brownrb - 2023-03-19

      Thanks Nikolas, I will update the firmware zip file.
      regards
      Robert

       

      Last edit: brownrb 2023-03-19

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.