application: increase heater temperature limit
This commit is contained in:
parent
5ab04af9b0
commit
03ed02b82c
|
@ -1,4 +1,4 @@
|
|||
/** STM32F4 application example
|
||||
/** firmware to raise sourdough starter (also called yeast)
|
||||
* @file
|
||||
* @author King Kévin <kingkevin@cuvoodoo.info>
|
||||
* @copyright SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
@ -72,6 +72,10 @@ static float ir_temp = NAN; /**< yeast/sour dough starter temperature as measure
|
|||
#define HEATER_PIN PB12
|
||||
#define heater_on() gpio_set(GPIO_PORT(HEATER_PIN), GPIO_PIN(HEATER_PIN)) // switch transistor on to let resistor heat
|
||||
#define heater_off() gpio_clear(GPIO_PORT(HEATER_PIN), GPIO_PIN(HEATER_PIN)) // switch transistor off
|
||||
/** maximum heater temperature, in °C
|
||||
* @note 50 °C only allowed the starter to go up to 29 °C
|
||||
*/
|
||||
#define HEATER_LIMIT 60.0
|
||||
|
||||
/** ADC channel connected to thermistor */
|
||||
#define THERMISTOR_CHANNEL 6 // PA6
|
||||
|
@ -771,7 +775,7 @@ void main(void)
|
|||
heater_off(); // stop heating
|
||||
}
|
||||
}
|
||||
if (!isnan(heater_temp) && heater_temp > 50.0) { // turn off heater for safety
|
||||
if (!isnan(heater_temp) && heater_temp > HEATER_LIMIT) { // turn off heater for safety
|
||||
heater_off(); // stop heating
|
||||
}
|
||||
// update how much the start raised
|
||||
|
|
Loading…
Reference in New Issue