Bonjour à tous,
J'ai trouvé un sujet sur le côté anglais qui détails la mise en place de la mise en pause des prints lorsque via un endstop la machine détecte le manque de filament. C'est ici : [forums.reprap.org]
Et le code en détails c'est ça :
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");
}
J'ai suivi à la lettre les indications cependant je me retrouve avec une erreur de compilation et comme je ne suis pas super fiable sur la programmation j'ai besoin d'aider, si quelqu'un peu jeter un peu de lumière la dessus, merci d'avance.
Le code erreur :
Marlin_main.cpp: In function 'void setup()':
Marlin_main.cpp:532: error: 'setup_pausepin' was not declared in this scope
Bonne journée
J'ai trouvé un sujet sur le côté anglais qui détails la mise en place de la mise en pause des prints lorsque via un endstop la machine détecte le manque de filament. C'est ici : [forums.reprap.org]
Et le code en détails c'est ça :
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");
}
J'ai suivi à la lettre les indications cependant je me retrouve avec une erreur de compilation et comme je ne suis pas super fiable sur la programmation j'ai besoin d'aider, si quelqu'un peu jeter un peu de lumière la dessus, merci d'avance.
Le code erreur :
Marlin_main.cpp: In function 'void setup()':
Marlin_main.cpp:532: error: 'setup_pausepin' was not declared in this scope
Bonne journée