Set GPIO pin state based on hotend temperature May 09, 2019 05:08AM |
Registered: 4 years ago Posts: 2 |
Re: Set GPIO pin state based on hotend temperature May 09, 2019 08:55AM |
Admin Registered: 13 years ago Posts: 7,000 |
/** * Extruder cooling fans * * Extruder auto fans automatically turn on when their extruders' * temperatures go above EXTRUDER_AUTO_FAN_TEMPERATURE. * * Your board's pins file specifies the recommended pins. Override those here * or set to -1 to disable completely. * * Multiple extruders can be assigned to the same pin in which case * the fan will turn on when any selected extruder is above the threshold. */ #define E0_AUTO_FAN_PIN -1 #define E1_AUTO_FAN_PIN -1 #define E2_AUTO_FAN_PIN -1 #define E3_AUTO_FAN_PIN -1 #define E4_AUTO_FAN_PIN -1 #define E5_AUTO_FAN_PIN -1 #define CHAMBER_AUTO_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 50 #define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed
Re: Set GPIO pin state based on hotend temperature May 10, 2019 01:11AM |
Registered: 4 years ago Posts: 2 |
FORCE_INLINE static float degHotend(const uint8_t e) { E_UNUSED(); // Custom firmware for fume extraction and lighting system if (temp_hotend[HOTEND_INDEX].current >= 35) { PORTH |= (1 << 1); // turn on system } else { PORTH &= ~(1 << 1); // turn off system } return temp_hotend[HOTEND_INDEX].current; }
Re: Set GPIO pin state based on hotend temperature May 11, 2019 04:27AM |
Registered: 5 years ago Posts: 148 |