extruder: Set/get bed temperature.
This commit is contained in:
parent
6d83bdb067
commit
5e56784ac1
|
|
@ -33,9 +33,14 @@
|
||||||
#define TEMP_PIN AIO3
|
#define TEMP_PIN AIO3
|
||||||
#define TEMP_PIN_CHANNEL 3
|
#define TEMP_PIN_CHANNEL 3
|
||||||
|
|
||||||
|
//Read analog voltage from thermistor
|
||||||
|
#define TEMP_BED_PIN AIO6
|
||||||
|
#define TEMP_BED_PIN_CHANNEL 6
|
||||||
|
|
||||||
|
|
||||||
#define REFERENCE REFERENCE_AVCC
|
#define REFERENCE REFERENCE_AVCC
|
||||||
|
|
||||||
#define ANALOG_MASK (MASK(TRIM_POT_CHANNEL) | MASK(TEMP_PIN_CHANNEL))
|
#define ANALOG_MASK (MASK(TRIM_POT_CHANNEL) | MASK(TEMP_PIN_CHANNEL) | MASK(TEMP_BED_PIN_CHANNEL))
|
||||||
|
|
||||||
#define TEMP_THERMISTOR
|
#define TEMP_THERMISTOR
|
||||||
|
|
||||||
|
|
@ -48,7 +53,8 @@
|
||||||
#define TEMP_RESIDENCY_TIME 60
|
#define TEMP_RESIDENCY_TIME 60
|
||||||
|
|
||||||
#ifdef DEFINE_TEMP_SENSOR
|
#ifdef DEFINE_TEMP_SENSOR
|
||||||
DEFINE_TEMP_SENSOR(extruder, TT_THERMISTOR, PINC3)
|
DEFINE_TEMP_SENSOR(extruder, TT_THERMISTOR, TEMP_PIN_CHANNEL)
|
||||||
|
DEFINE_TEMP_SENSOR(bed, TT_THERMISTOR, TEMP_BED_PIN_CHANNEL)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEFINE_HEATER
|
#ifdef DEFINE_HEATER
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ void io_init(void) {
|
||||||
|
|
||||||
SET_INPUT(TRIM_POT);
|
SET_INPUT(TRIM_POT);
|
||||||
SET_INPUT(TEMP_PIN);
|
SET_INPUT(TEMP_PIN);
|
||||||
|
SET_INPUT(TEMP_BED_PIN);
|
||||||
SET_INPUT(E_STEP_PIN);
|
SET_INPUT(E_STEP_PIN);
|
||||||
SET_INPUT(E_DIR_PIN);
|
SET_INPUT(E_DIR_PIN);
|
||||||
|
|
||||||
|
|
@ -194,6 +195,8 @@ int main (void)
|
||||||
temp_sensor_tick();
|
temp_sensor_tick();
|
||||||
|
|
||||||
send_temperature(0, temp_get(0));
|
send_temperature(0, temp_get(0));
|
||||||
|
send_temperature(1, temp_get(1));
|
||||||
temp_set(0, read_temperature(0));
|
temp_set(0, read_temperature(0));
|
||||||
|
temp_set(1, read_temperature(1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue