Welcome! Log In Create A New Profile


Simple filament end sensor - REPETIER FIRMWARE

Posted by luke4v 
Simple filament end sensor - REPETIER FIRMWARE
September 06, 2015 09:44AM
so... I want to make a simple end of filament sensor (something like that: [www.thingiverse.com]), and want to connect it to a max. Z position sensor (because i'm not using it).
I use Rumba mainbord, I know how to make sensor, but... I'm pretty lame at programming.I don't know how to create the code in Repetier Firmware.
I found a code that works in Marlin, and it's made im the way that when the swith is off it calls the M600 to change the filament command.
here is the code which I found that works in Marlin and I my question is how to do it in Repetier Firmware?
in pins.h under the board your using add

#define PAUSE_PIN 42

i used pin 42 just for testing but you can use any you have free.

in Marlin.h find void kill(); and add after it

void pause();

in Marlin_main.cpp find void setup() and after setup_killpin(); add


then find void manage_inactivity() then find

#if defined(KILL_PIN) && KILL_PIN > -1
if( 0 == READ(KILL_PIN) )

and after it add

#if defined(PAUSE_PIN) && PAUSE_PIN > -1
if( 0 == READ(PAUSE_PIN) )

finally at the end of the file add the following

void setup_pausepin()
#if defined(PAUSE_PIN) && PAUSE_PIN > -1

void pause()
enquecommand("G4 P0");
enquecommand("G4 P0");
enquecommand("G4 P0");

This works but you could change the M600 to what ever you want. The G4 P0 does nothing but is there just to fill the buffer otherwise you get the M600 added 4 times in the buffer.

Im sure there is a better way but give it a go

Thank you in advance!
Re: Simple filament end sensor - REPETIER FIRMWARE
March 21, 2016 04:06PM
Hello everyone , I would be interested too!
Re: Simple filament end sensor - REPETIER FIRMWARE
November 03, 2022 04:00AM
Updated to platformio and patched copy can be found here [github.com]

Edited 1 time(s). Last edit at 11/03/2022 04:00AM by Dust.
Sorry, only registered users may post in this forum.

Click here to login