From f1b8cdc91cb80aa8b129feec966f82660e2fe108 Mon Sep 17 00:00:00 2001 From: Jason Bruce Date: Wed, 28 Apr 2021 16:17:22 -0400 Subject: [PATCH] added config.gpio_sensor_di to the config file and the code for max-31856. Thanks Mark Tilles. --- config.py | 1 + lib/oven.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config.py b/config.py index 29b9420..293aed7 100644 --- a/config.py +++ b/config.py @@ -41,6 +41,7 @@ thermocouple_type = MAX31856.MAX31856_S_TYPE gpio_sensor_cs = 27 gpio_sensor_clock = 22 gpio_sensor_data = 17 +gpio_sensor_di = 10 # only used with max31856 ### duty cycle of the entire system in seconds. Every N seconds a decision ### is made about switching the relay[s] on & off and for how long. diff --git a/lib/oven.py b/lib/oven.py index 17ea994..4a1f5b0 100644 --- a/lib/oven.py +++ b/lib/oven.py @@ -107,7 +107,8 @@ class TempSensorReal(TempSensor): from max31856 import MAX31856 software_spi = { 'cs': config.gpio_sensor_cs, 'clk': config.gpio_sensor_clock, - 'do': config.gpio_sensor_data } + 'do': config.gpio_sensor_data, + 'di': config.gpio_sensor_di } self.thermocouple = MAX31856(tc_type=config.thermocouple_type, software_spi = sofware_spi, units = config.temp_scale