Hi,
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?
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 find void kill();
and add after it
void pause();
in Marlin_main.cpp find void setup()
and after setup_killpin();
add
setup_pausepin();
then find void 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
Thank you in advance!