<p>When using <a href="http://marlinfw.org/" rel="noreferrer">Marlin firmware</a> you could easily change the pin layout of the extra extruder (E1) with the broken X stepper pins by changing the <a href="https://github.com/MarlinFirmware/Marlin/blob/1.1.x/Marlin/pins_RAMPS.h" rel="noreferrer">pins_RAMPS.h</a> file.</p>

<p><a href="http://marlinfw.org/meta/download/" rel="noreferrer">Download</a> the firmware and open the firmware project in <a href="https://www.arduino.cc/en/Main/Software" rel="noreferrer">Arduino IDE</a>. Navigate to the "Steppers" section of the <a href="https://github.com/MarlinFirmware/Marlin/blob/1.1.x/Marlin/pins_RAMPS.h" rel="noreferrer">pins_RAMPS.h</a> file and replace:</p>

<pre><code>#define X_STEP_PIN         54
#define X_DIR_PIN          55
#define X_ENABLE_PIN       38
#define X_CS_PIN           53
</code></pre>

<p>for:</p>

<pre><code>#define X_STEP_PIN         36
#define X_DIR_PIN          34
#define X_ENABLE_PIN       30
#define X_CS_PIN           44
</code></pre>

<p>and also change:</p>

<pre><code>#define E1_STEP_PIN        36
#define E1_DIR_PIN         34
#define E1_ENABLE_PIN      30
#define E1_CS_PIN          44
</code></pre>

<p>to:</p>

<pre><code>#define E1_STEP_PIN        54
#define E1_DIR_PIN         55
#define E1_ENABLE_PIN      38
#define E1_CS_PIN          53
</code></pre>

<p>When the file is changed an saved, <a href="http://marlinfw.org/docs/basics/install.html" rel="noreferrer">build and upload</a> code to your board and plug the connector of the X stepper into the E1 header.</p>

CC BY-SA 3.0
2018-04-09T17:37:17.300Z
2018-04-09T17:37:17.300Z
0scar
<p>you can find pin.h in marlin directory and in pin.h file change # define pinout of z motor and extruder motor</p>

CC BY-SA 3.0
2017-04-27T06:21:57.980Z
Exactly! I found thease in pinsRAMPS.h thx for help!
BuzzKill
CC BY-SA 3.0
2017-04-28T09:43:10.470Z
This answer is very terse, and might not include enough details for some users. Perhaps you could improve it by including a bit more detail on what needs to be changed exactly?
Tom van der Zanden
CC BY-SA 3.0
2017-04-26T10:46:53.230Z
2017-04-28T08:26:42.567Z
2017-04-28T08:26:42.567Z
Kallz
<p>I broke up my electronics and now the output for X is not working. The stepper is OK. </p>

<p>There is any simple solution to remap the output pins? I want the E1 output to act as the X output.</p>

CC BY-SA 3.0
2017-05-10T17:21:13.850Z
If the answer below fixed your problem could you please accept it, using the "Tick icon" next to it, in order to remove it from the [unanswered questions](https://3dprinting.stackexchange.com/unanswered) list?
Greenonline
<marlin><reprap>
How to switch motor outputs and use E1 as X, in Marlin firmware?
BuzzKill
# How to switch motor outputs and use E1 as X, in Marlin firmware?

(Asked by: username_0 on 2017-04-26)

I broke up my electronics and now the output for X is not working. The stepper is OK.

There is any simple solution to remap the output pins? I want the E1 output to act as the X output.

**Tags:** marlin, reprap

> **Comments:**
> **username_1**: If the answer below fixed your problem could you please accept it, using the "Tick icon" next to it, in order to remove it from the [unanswered questions](https://3dprinting.stackexchange.com/unanswered) list?  

---

## 2 answers

### Answer by username_2 on 2018-04-09. Score: 6

When using [Marlin firmware](http://marlinfw.org/) you could easily change the pin layout of the extra extruder (E1) with the broken X stepper pins by changing the [pins\_RAMPS.h](https://github.com/MarlinFirmware/Marlin/blob/1.1.x/Marlin/pins_RAMPS.h) file.

[Download](http://marlinfw.org/meta/download/) the firmware and open the firmware project in [Arduino IDE](https://www.arduino.cc/en/Main/Software). Navigate to the "Steppers" section of the [pins\_RAMPS.h](https://github.com/MarlinFirmware/Marlin/blob/1.1.x/Marlin/pins_RAMPS.h) file and replace:

```
#define X_STEP_PIN         54
#define X_DIR_PIN          55
#define X_ENABLE_PIN       38
#define X_CS_PIN           53

```

for:

```
#define X_STEP_PIN         36
#define X_DIR_PIN          34
#define X_ENABLE_PIN       30
#define X_CS_PIN           44

```

and also change:

```
#define E1_STEP_PIN        36
#define E1_DIR_PIN         34
#define E1_ENABLE_PIN      30
#define E1_CS_PIN          44

```

to:

```
#define E1_STEP_PIN        54
#define E1_DIR_PIN         55
#define E1_ENABLE_PIN      38
#define E1_CS_PIN          53

```

When the file is changed an saved, [build and upload](http://marlinfw.org/docs/basics/install.html) code to your board and plug the connector of the X stepper into the E1 header.


---

### Answer by username_3 on 2017-04-26. Score: -1

you can find pin.h in marlin directory and in pin.h file change # define pinout of z motor and extruder motor

> **Comments:**
> **username_0**: Exactly! I found thease in pinsRAMPS.h thx for help!  
> **username_4**: This answer is very terse, and might not include enough details for some users. Perhaps you could improve it by including a bit more detail on what needs to be changed exactly?  

---

