Simple filament end sensor - REPETIER FIRMWARE September 06, 2015 09:44AM |
Registered: 8 years ago Posts: 1 |
Quote
lazzymonk
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 findvoid kill();
and add after it
void pause();
in Marlin_main.cpp findvoid setup()
and aftersetup_killpin();
add
setup_pausepin();
then findvoid manage_inactivity()
then find
#if defined(KILL_PIN) && KILL_PIN > -1
if( 0 == READ(KILL_PIN) )
kill();
#endif
and after it add
#if defined(PAUSE_PIN) && PAUSE_PIN > -1
if( 0 == READ(PAUSE_PIN) )
pause();
#endif
finally at the end of the file add the following
void setup_pausepin()
{
#if defined(PAUSE_PIN) && PAUSE_PIN > -1
pinMode(PAUSE_PIN,INPUT);
WRITE(PAUSE_PIN,HIGH);
#endif
}
void pause()
{
enquecommand("M600");
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
Re: Simple filament end sensor - REPETIER FIRMWARE March 21, 2016 04:06PM |
Registered: 9 years ago Posts: 3 |
Re: Simple filament end sensor - REPETIER FIRMWARE November 03, 2022 04:00AM |
Admin Registered: 13 years ago Posts: 7,005 |