MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.23k stars 19.22k forks source link

Compile error USE_CONTROLLER_FAN #7938

Closed android444 closed 6 years ago

android444 commented 7 years ago

Compile Error

When I compile with USE_CONTROLLER_FAN I get an error:

In file included from k:\Temp\arduino_build_136131\sketch\src/inc/MarlinConfig.h:39:0,

                 from H:\drukarka 3d\Github\Marlin\Marlin\Marlin.ino:31:

k:\Temp\arduino_build_136131\sketch\src/inc/SanityCheck.h:893:6: error: #error "USE_CONTROLLER_FAN requires a CONTROLLER_FAN_PIN. Define in Configuration_adv.h."

     #error "USE_CONTROLLER_FAN requires a CONTROLLER_FAN_PIN. Define in Configuration_adv.h."

      ^

exit status 1
Błąd kompilacji dla płytki Arduino/Genuino Mega or Mega 2560.

Configuration_adv.zip

oakdesign commented 7 years ago

which board are you using and where have you wired your controller fan to?

android444 commented 7 years ago

Default configuration file 'configuration.h' Changes only in 'configuration_adv.h'

oakdesign commented 7 years ago

Default for which board? If for RAMPS in EFB Mode Extruder Fan Bed Setup the FAN_PIN1 is set to -1 so you need the Signal pin number you have wired your Controller fan to

android444 commented 7 years ago

This is badly done. Pin should be selected in xxx_pins.h

Radiu commented 7 years ago

sorry to jump in but im having same kind of problems it seems to me that the FAN_Pin sections is not well documented and share same name on multiple sections for what i see the USE_CONTROLLER_FAN is for the fan turn on automatically whenever any stepper is enabled

the part from exruder fans i never got to work out this section

#define E0_AUTO_FAN_PIN -1
#define EXTRUDER_AUTO_FAN_TEMPERATURE 50
#define EXTRUDER_AUTO_FAN_SPEED   255  // == full speed

my extruder is set on the E0 slot and im using ramps motherboard EFB, when i try set a pin #define E0_AUTO_FAN_PIN 9 always get error, by default it should work sense fan is conected on D9 of ramps maybe im missing something no idea, but i never got my fan to start working when goes above AUTO_FAN_TEMPERATURE 50, only got to work by using the comand M106 S50 its a litle confusing, dont get it why doesnt work sense is already set on pin.h

#if ENABLED(IS_RAMPS_EFB)                      // Hotend, Fan, Bed
  #define FAN_PIN        RAMPS_D9_PIN
  #define HEATER_BED_PIN RAMPS_D8_PIN
AnHardt commented 7 years ago

In Marlin we have 3 kinds of fans

oakdesign commented 7 years ago

Ok this my working setup for E0_AUTO_FAN_PIN and USE_CONTROLLER_FAN I have both fans wired through a IRF520 Mini Mosfet. From every IRF520 I have a single Signal wire to one of the Signal Pins on the Servo Pins D4 D5 D6 on the RAMPS so for

define E0_AUTO_FAN_PIN 4

define CONTROLLER_FAN_PIN 5

and D6 I'm using for LED case light

define CASE_LIGHT_PIN 6

setup in the configuration_adv.h On the RAMPS Pins D2-D11 and D44-46 are PWM cabable

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.