如何更换温度传感器的引脚?

3D打印 固件 坡道-1.4 anycubic-i3-mega
2021-05-18 07:13:58

我的 Anycubic Mega 上的热敏电阻显示无意义的温度(例如 700 °C),因为热端中的电阻工作正常,问题出在电路板上(Trigorilla RAMPS 1.4)。有人建议将热敏电阻的引脚从 切换T0T1,所以我是这样焊接的。现在我必须编写一个个性化的固件才能让它工作。我在 VSCode 中打开了一个自定义固件,但我不知道我必须更改什么参数,知道吗?

1个回答

如果有 2 个用于温度测量的插槽,则不需要焊接任何东西,只需将热敏电阻从一个插入另一个并切换固件中的引脚即可。这个板子基本上是一个RAMPS 1.4板子,它包含pins_RAMPS.h头文件,所以为了将T0与T1温度端口切换,需要更改:

//
// Temperature Sensors
//
#ifndef TEMP_0_PIN
  #define TEMP_0_PIN                          13  // Analog Input
#endif
#ifndef TEMP_1_PIN
  #define TEMP_1_PIN                          15  // Analog Input
#endif

到:

//
// Temperature Sensors
//
#ifndef TEMP_0_PIN
  #define TEMP_0_PIN                          15  // Analog Input
#endif
#ifndef TEMP_1_PIN
  #define TEMP_1_PIN                          13  // Analog Input
#endif