<p>At first it was unclear from where the snippet you posted is taken from as it was not stated in the question (<em>this has now been addressed by a moderator edit</em>).</p>

<p>Depending on the value of <code>EXTRUDER_USE_E1</code> (and where and how it is set) the underlying code of the if statement will be carried out. Albeit said, swapping lines will not work, if you want to use the E1 connector of your motherboard, you have to make the printer think that it is using the E0 while it is redirecting to E1! This implies that you need to assign the pins of the E1 to the E0 extruder (so swap the pins, not the lines). This has been explained before in <a href="https://3dprinting.stackexchange.com/questions/5840/how-to-change-e0-to-e1-on-marlin-1-1">this topic</a> by editing the correct pin layout file of the Marlin firmware.</p>

<hr>

<p><strong>EDIT :</strong> Further investigation shows that you have a custom Marlin for the TEVO Tarantula and are using the fork of Marlin maintained by <a href="https://github.com/JimBrown/MarlinTarantula" rel="nofollow noreferrer">JimBrown</a> (<strong>this is essential information</strong> for your question). I have looked into the files, the only thing you would need to do is define the constant <code>EXTRUDER_USE_E1</code> in your <a href="https://github.com/JimBrown/MarlinTarantula/blob/EasyConfig-1.1.x/Marlin/Configuration.h" rel="nofollow noreferrer">configuration.h</a> file:</p>

<pre><code>//#define EXTRUDER_USE_E1
</code></pre>

<p>to:</p>

<pre><code>#define EXTRUDER_USE_E1
</code></pre>

<p>So do not swap anything. Once this constant is defined, the pin re-allocation is done for you automatically! (see the <a href="https://github.com/JimBrown/MarlinTarantula/blob/EasyConfig-1.1.x/Marlin/pins_RAMPS.h" rel="nofollow noreferrer">pins_RAMPS.h file</a>)</p>

<p>Basically, this is exactly the same as is explained in topic <a href="https://3dprinting.stackexchange.com/questions/5840/how-to-change-e0-to-e1-on-marlin-1-1">How to change E0 to E1 on Marlin 1.1?</a> and hence a duplicate. ;)</p>

CC BY-SA 4.0
2018-05-14T07:48:37.173Z
2018-07-20T12:09:57.220Z
2018-07-20T12:09:57.220Z
0scar
<p>I simply swapped the pins </p>

<pre><code>#define E1_STEP_PIN        26  //swapping to E1 FRED
#define E1_DIR_PIN         28
#define E1_ENABLE_PIN      24
#ifndef E1_CS_PIN
  #define E1_CS_PIN        42
#endif

#define E0_STEP_PIN        36  //swapping to E0 FRED
#define E0_DIR_PIN         34
#define E0_ENABLE_PIN      30
#ifndef E0_CS_PIN
  #define E0_CS_PIN        44
#endif
</code></pre>

<p>Which worked for the basic operation, however now that I've tried to add Autoleveling it stopped moving E1 motor. My configuration.h file does not have:<br>
<code>#define EXTRUDER_USE_E1</code>
 apparently as its an older version also, just like RAMPS.h doesn't have those conditional statements.</p>

CC BY-SA 4.0
2019-05-29T06:17:54.803Z
Basically this is a [similar answer](/a/5844) as the one linked in [this answer](/a/5965). Why not post your own question on the auto bed levelling so that others may help you! Please note that `#define EXTRUDER_USE_E1` is something specific for the JimBrown fork of Marlin. And last but not least: "Welcome to 3D Printing.SE!"
0scar
CC BY-SA 4.0
2019-05-29T07:52:01.630Z
Hi and welcome to SE.3DP! Unfortunately, your answer does not really answer the question. StackExchange is a Q&A site, and not a forum of threaded messages. The reason for this is to aid the search for answers to issues, and provide it in a structured Q&A way. Can you repost your question using the [Ask Question](/questions/ask) link at the top of the page? When you repost your new question, add the Marlin version, refer back to this original question using the URL (seeing as it is the reason why you posted in the first place) and delete this answer. Thank you.
Greenonline
CC BY-SA 4.0
2019-05-29T03:54:17.250Z
2019-05-29T06:11:07.767Z
2019-05-29T06:11:07.767Z
Alfred Hamori
<p>Looking at the following code, from <a href="https://github.com/JimBrown/MarlinTarantula/blob/2ce73937f3c57aac28a8d5f11a6ed9135a27cdca/Marlin/pins_RAMPS.h#L139" rel="nofollow noreferrer">Line 139</a>, <a href="https://github.com/JimBrown/MarlinTarantula/blob/2ce73937f3c57aac28a8d5f11a6ed9135a27cdca/Marlin/pins_RAMPS.h" rel="nofollow noreferrer">pins_RAMPS.h</a></p>

<p><a href="https://i.sstatic.net/ufVqI.png" rel="nofollow noreferrer" title="Screenshot of code snippet"><img src="https://i.sstatic.net/ufVqI.png" alt="Screenshot of code snippet" title="Screenshot of code snippet"></a></p>

<p>Here is the actual code:</p>

<pre><code>#if ENABLED(EXTRUDER_USE_E1)
  #define E0_STEP_PIN        36
  #define E0_DIR_PIN         34
  #define E0_ENABLE_PIN      30
  #ifndef E0_CS_PIN
    #define E0_CS_PIN        44
  #endif
#else
  #define E0_STEP_PIN        26
  #define E0_DIR_PIN         28
  #define E0_ENABLE_PIN      24
  #ifndef E0_CS_PIN
  #define E0_CS_PIN        42
  #endif
#endif

#if DISABLED(X_AXIS_USE_E1) &amp;&amp; DISABLED(Y_AXIS_USE_E1) &amp;&amp; DISABLED(Z_AXIS_USE_E1) &amp;&amp; DISABLED(EXTRUDER_USE_E1)
  #define E1_STEP_PIN        36
  #define E1_DIR_PIN         34
  #define E1_ENABLE_PIN      30
  #ifndef E1_CS_PIN
  #define E1_CS_PIN        44
  #endif
#endif
</code></pre>

<p>I've already tried everything that the online community tells me to do to solve this problem, but that all doesn't help me. Almost everyone is saying that I just have to swap these lines of code and it will work, but it's not working. Any ideas ?</p>

<p>By the way E0 is not working because I've burnt a pot on it :)</p>

CC BY-SA 4.0
2018-05-13T18:20:27.100Z
Possible duplicate of [How to change E0 to E1 on Marlin 1.1?](https://3dprinting.stackexchange.com/questions/5840/how-to-change-e0-to-e1-on-marlin-1-1)
0scar
CC BY-SA 4.0
2018-05-13T19:19:42.413Z
No, my question is different. I have lines of code changed, but it's not working while on the other post there were no such lines at all
Ilya Smirnoff
CC BY-SA 4.0
2018-05-13T21:50:11.710Z
please check this one and let me know if that helps: https://3dprinting.stackexchange.com/a/5916/9730
profesor79
CC BY-SA 4.0
2018-05-14T07:34:00.290Z
@IlyaSmirnoff the linked topic describes what you need to do to change the pin layout to swap E0 for E1, so that will work if you alter the pins in the correct pin layout file for your motherboard. Where is the snippet you posted taken from? I cannot find this in default Marlin.
0scar
CC BY-SA 4.0
2019-05-29T08:59:40.393Z
Hi, as you say that 0scar's and Professor's proposed solutions didn't work for you, I was wondering whether you ever fixed your problem and found a solution? If so, could you post it..?
Greenonline
<extruder><marlin><tevo-tarantula>
Problem with swapping E0 for E1 (TEVO TARANTULA MARLIN 1.1.x)
Ilya Smirnoff
# Problem with swapping E0 for E1 (TEVO TARANTULA MARLIN 1.1.x)

(Asked by: username_0 on 2018-05-13)

Looking at the following code, from Line 139, pins_RAMPS.h

Here is the actual code:
#if ENABLED(EXTRUDER_USE_E1)
  #define E0_STEP_PIN        36
  #define E0_DIR_PIN         34
  #define E0_ENABLE_PIN      30
  #ifndef E0_CS_PIN
    #define E0_CS_PIN        44
  #endif
#else
  #define E0_STEP_PIN        26
  #define E0_DIR_PIN         28
  #define E0_ENABLE_PIN      24
  #ifndef E0_CS_PIN
  #define E0_CS_PIN        42
  #endif
#endif

#if DISABLED(X_AXIS_USE_E1) && DISABLED(Y_AXIS_USE_E1) && DISABLED(Z_AXIS_USE_E1) && DISABLED(EXTRUDER_USE_E1)
  #define E1_STEP_PIN        36
  #define E1_DIR_PIN         34
  #define E1_ENABLE_PIN      30
  #ifndef E1_CS_PIN
  #define E1_CS_PIN        44
  #endif
#endif

I've already tried everything that the online community tells me to do to solve this problem, but that all doesn't help me. Almost everyone is saying that I just have to swap these lines of code and it will work, but it's not working. Any ideas ?
By the way E0 is not working because I've burnt a pot on it :)

**Tags:** extruder, marlin, tevo-tarantula
> **Comments:**
> **username_1**: Possible duplicate of [How to change E0 to E1 on Marlin 1.1?](https://3dprinting.stackexchange.com/questions/5840/how-to-change-e0-to-e1-on-marlin-1-1)  
> **username_0**: No, my question is different. I have lines of code changed, but it's not working while on the other post there were no such lines at all  
> **username_2**: please check this one and let me know if that helps: https://3dprinting.stackexchange.com/a/5916/9730  
> **username_1**: @IlyaSmirnoff the linked topic describes what you need to do to change the pin layout to swap E0 for E1, so that will work if you alter the pins in the correct pin layout file for your motherboard. Where is the snippet you posted taken from? I cannot find this in default Marlin.  
> **username_3**: Hi, as you say that 0scar's and Professor's proposed solutions didn't work for you, I was wondering whether you ever fixed your problem and found a solution? If so, could you post it..?  

---

## 2 answers

### Answer by username_1 on 2018-05-14. Score: 1

At first it was unclear from where the snippet you posted is taken from as it was not stated in the question (this has now been addressed by a moderator edit).
Depending on the value of EXTRUDER_USE_E1 (and where and how it is set) the underlying code of the if statement will be carried out. Albeit said, swapping lines will not work, if you want to use the E1 connector of your motherboard, you have to make the printer think that it is using the E0 while it is redirecting to E1! This implies that you need to assign the pins of the E1 to the E0 extruder (so swap the pins, not the lines). This has been explained before in this topic by editing the correct pin layout file of the Marlin firmware.

EDIT : Further investigation shows that you have a custom Marlin for the TEVO Tarantula and are using the fork of Marlin maintained by JimBrown (this is essential information for your question). I have looked into the files, the only thing you would need to do is define the constant EXTRUDER_USE_E1 in your configuration.h file:
//#define EXTRUDER_USE_E1

to:
#define EXTRUDER_USE_E1

So do not swap anything. Once this constant is defined, the pin re-allocation is done for you automatically! (see the pins_RAMPS.h file)
Basically, this is exactly the same as is explained in topic How to change E0 to E1 on Marlin 1.1? and hence a duplicate. ;)


---

### Answer by username_4 on 2019-05-29. Score: 0

I simply swapped the pins 
#define E1_STEP_PIN        26  //swapping to E1 FRED
#define E1_DIR_PIN         28
#define E1_ENABLE_PIN      24
#ifndef E1_CS_PIN
  #define E1_CS_PIN        42
#endif

#define E0_STEP_PIN        36  //swapping to E0 FRED
#define E0_DIR_PIN         34
#define E0_ENABLE_PIN      30
#ifndef E0_CS_PIN
  #define E0_CS_PIN        44
#endif

Which worked for the basic operation, however now that I've tried to add Autoleveling it stopped moving E1 motor. My configuration.h file does not have:
#define EXTRUDER_USE_E1
 apparently as its an older version also, just like RAMPS.h doesn't have those conditional statements.

> **Comments:**
> **username_1**: Basically this is a [similar answer](/a/5844) as the one linked in [this answer](/a/5965). Why not post your own question on the auto bed levelling so that others may help you! Please note that `#define EXTRUDER_USE_E1` is something specific for the JimBrown fork of Marlin. And last but not least: "Welcome to 3D Printing.SE!"  
> **username_3**: Hi and welcome to SE.3DP! Unfortunately, your answer does not really answer the question. StackExchange is a Q&A site, and not a forum of threaded messages. The reason for this is to aid the search for answers to issues, and provide it in a structured Q&A way. Can you repost your question using the [Ask Question](/questions/ask) link at the top of the page? When you repost your new question, add the Marlin version, refer back to this original question using the URL (seeing as it is the reason why you posted in the first place) and delete this answer. Thank you.  

---

