<p>I made a custom printer with RAMPS. I used Y-MIN endstop at beginning. After few prints I discovered that Y-axis was inverted (mirrored).</p>

<p>I fixed Marlin firmware and now I have:</p>

<pre><code>#define Y_MAX_ENDSTOP_INVERTING true
#define INVERT_Y_DIR false
#define Y_HOME_DIR 1
#define USE_YMAX_PLUG
</code></pre>

<p>I also connected the Y-endstop to Y-max pin on RAMPS.</p>

<p>Now the printer homing in the same direction than before (in front) and the y-endstop works as expected.</p>

<p>If I try to start printing or if I try to press the "center" button in Pronterface, the Y-axis moves in the wrong direction.</p>

<p>Can someone help me?</p>

[{'answer_id': 12105, 'author': 'henradrie', 'author_id': 14773, 'author_profile': 'https://3dprinting.stackexchange.com/users/14773', 'pm_score': 1, 'selected': False, 'text': '<p>Usually I just flip the connector around on the board. This causes the stepper to reverse without fiddling around with firmware.</p>\n'}, {'answer_id': 13747, 'author': 'Ryan Gaudion', 'author_id': 21333, 'author_profile': 'https://3dprinting.stackexchange.com/users/21333', 'pm_score': 2, 'selected': False, 'text': '<p>This <a href="https://www.everybitelectronics.co.uk/blog/3d-printer-error-prints-reversed/" rel="nofollow noreferrer">blog post</a> shows 3 main solutions:</p>\n\n<ol>\n<li>Flipping the motor cables (As suggested in the other answer)</li>\n<li>Switching the x and y-axis:\nThis may switch the direction of your y-axis depending on the way your printer is setup)</li>\n<li>Change the direction of the axis in firmware which you can see below how to do:</li>\n</ol>\n\n<blockquote>\n  <p>"When the solution opens up, you will see many different files open. You need to navigate to the Configuration.h file. Within this file scroll down to the following lines of code:"</p>\n</blockquote>\n\n<pre><code>// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way. \ndefine INVERT_X_DIR true \n\ndefine INVERT_Y_DIR true \n\ndefine INVERT_Z_DIR true\n</code></pre>\n\n<blockquote>\n  <p>"This is where you need to switch the values around. If they are currently true, change them to false and if they are false, change them to true. Due to the fact I was having issues with my x-Axis, I have changed the above to the following:"</p>\n</blockquote>\n\n<pre><code>// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.\n\ndefine INVERT_X_DIR false\n\ndefine INVERT_Y_DIR true \n\ndefine INVERT_Z_DIR true\n</code></pre>\n'}]
['https://3dprinting.stackexchange.com/questions/12098', 'https://3dprinting.stackexchange.com', 'https://3dprinting.stackexchange.com/users/20151/']