Git Product home page Git Product logo

Comments (4)

vettorazi avatar vettorazi commented on August 15, 2024

hey! did you checked the pins from the board to the arduino? the motor are in the right side (forward to you?)

from splitflap.

scottbez1 avatar scottbez1 commented on August 15, 2024

I've gotten one batch of motors that turned the opposite direction for whatever reason. These things are so cheap and I think manufactured by a bunch of different companies that you tend to get slightly different products from different vendors. That said, you can change the direction in code fairly easily by reversing the elements of the step_pattern array in splitflap_module.h:

const uint8_t step_pattern[] = {

Another thing to keep in mind is that there are two different gear ratios I've seen in motors, as mentioned on the Motor Info wiki page, so you may need to change the _GEAR_RATIO_INPUT and _GEAR_RATIO_OUTPUT values as described in the comment here:

// The gear ratio constants below represent the input:output ratio of the gearbox expressed as a simplified fraction.

The non-integer 63.684:1 gear ratio seems to be much more common in the 5V version of motors, so you may want to check for that as well if the motor doesn't seem to be aligned right after several full revolutions.

And one question out of curiosity - is the order of wires on your motor connectors Red, Orange, Yellow, Pink, Blue?

from splitflap.

henricazottes avatar henricazottes commented on August 15, 2024

Thanks, reversing the step_pattern did the job.

const uint8_t step_pattern[] = {
  MOT_PHASE_D | MOT_PHASE_A,
  MOT_PHASE_C | MOT_PHASE_D,
  MOT_PHASE_B | MOT_PHASE_C,
  MOT_PHASE_A | MOT_PHASE_B,
};

Didn't have to touch gear ratio. And yes, colors are in the order you mentioned :)

from splitflap.

scottbez1 avatar scottbez1 commented on August 15, 2024

👍 Going to change the title of this issue to make it a feature request for adding a direction toggle to the code. It really should be easier to flip the direction than reversing an array.

from splitflap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.