Tool Change G-CODE

Hello. I have two questions about the tool change script.

I am using  the RADDS 1.5 board in conjunction with the Arduino DUE.

I would like to switch on an LED when changing from extruder 0 (main material) to extruder 1 (support). This I put on the free fan slot of the RADDS boards. The LED is configured to handle the 24V output voltage of the board.
I use the firmware configuration tool version 1.03.
Now to the question:
At the point "Select commands EXT1_SELECT_COMMANDS" you can indeed insert the appropriate G-code. But how would such a code look like?
This is supposed to be done: switch voltage on PIN xy.

But how do you formulate it as G-code?
And how do I assign these pins in the firmware?

I'm newbie in this respect and I hope for your help.
Best regards, Marcel.


  • M42 P<pin number> S<value 0..255> - Change output of pin P to S. Does not work on most important pins.

    is your friend here. Just use S0 to disable and S255 to enable. Works with any pin that has no special function.

    But do you really want to use a 24V output for a led? You can use any pin - they have 3.3V. Just make sure the current does not exceed what due can handle on a single pin. There should be plenty of examples using google.

    Of course if you do not need the 24V outputs that is also totally fine. Just a tip so you have more outputs for fans.

Sign In or Register to comment.