PINS.H TOO LONG!!!

I need to reconfigure the pins that drive my X,Y, and Z motors.  I am using an Arduino Mega 2560 with RAMPS 1.4.

My problem:
There are multiple sections in Pins.h that specify an Mega.  How do I know my motherboard number?  There is also no section for RAMPS_1_4.  Is this the same as RAMPS_1_3?  I would assume so.

I guess it would be nice to have a Pins.h with the absolute minimum, not 2K lines of code.  Does anyone have something like this that I could use?

Comments

  • Reducing size means removing supported printer or splitting into 30 files which I also hate.

    Ramps 1.4 is like 1.3 simple search "== 33" to find right section.
  • edited May 2015
    Thanks!  I'll try that!

    It seems like the best solution would be to allow the config tool to write an abbreviated version of pins.h.
  • If it would know how to split it. But some parts are several boards in one and hard to split. So I would first need to unsplit all boards makeing the original even longer:-)
  • It looks like only 20-30 variables are actually defined here.  Is that correct?  If that's the case, you could simply add a generic section at the top or bottom with comments instructing that this is the minimum necessary for things to run.  The user could then erase anything beyond that.
  • Number of variables depends on complexity of the board. I guess complex boards can have up to 50 variables.

    In your solution the users would need to edit pins.h. This is a file where you never should modify anything except there is an error. If you have a deviation from what is defined here you use the direct pin numbers in configuration.h instead. No need to add variables here. If you so much like variables, you can also add them after the include "pins.h" in configuration.h.
  • Oh that's great!  I wasn't sure if these variables were used inside the rest of the code or not.
Sign In or Register to comment.