From 2da13d1ffa9036a1aa942ecd52fe80d5cece6fe4 Mon Sep 17 00:00:00 2001 From: jlino Date: Mon, 25 Jun 2018 18:48:07 +0100 Subject: [PATCH] machine calibration done --- brew.h | 2 +- brew.ino | 10 ++++++---- src/Temperature/Temperature.cpp | 6 ++++-- src/Temperature/Temperature.h | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/brew.h b/brew.h index e713e07..cd74488 100644 --- a/brew.h +++ b/brew.h @@ -14,7 +14,7 @@ #define NELEMS(x) (sizeof(x) / sizeof((x)[0])) // ++++++++++++++++++++++++ Cooking Variables ++++++++++++++++++++++++ -#define COOKING_MAX_OVER_TEMPERATURE_RANGE_ALLOWED 5.0 +#define COOKING_MAX_OVER_TEMPERATURE_RANGE_ALLOWED 2.0 // ++++++++++++++++++++++++ OTHER +++++++++++++++++++++++++++++++++ #include "CustomDataStructures.h" diff --git a/brew.ino b/brew.ino index b1e652a..4132d49 100644 --- a/brew.ino +++ b/brew.ino @@ -113,18 +113,20 @@ Temperature basePT100("base", PT100_BASE_OUTPUT_PIN, PT100_BASE_INPUT_PIN, PT100_BASE_TIME_BETWEEN_READINGS, - 2.0298, 2.0259, 665.24, 662.17); + //2.0298, 2.0259, 665.24, 662.17); // orig + 2.0208, 2.0281, 663.52, 665.49); Temperature upPT100("up", PT100_UP_OUTPUT_PIN, PT100_UP_INPUT_PIN, PT100_UP_TIME_BETWEEN_READINGS, - 2.0274, 2.0245, 659.43, 656.72); + //2.0274, 2.0245, 659.43, 656.72); // orig + 2.0279, 2.0264, 656.57, 659); Temperature downPT100("down", PT100_DOWN_OUTPUT_PIN, PT100_DOWN_INPUT_PIN, PT100_DOWN_TIME_BETWEEN_READINGS, - //2.0309, 2.0288, 658.15, 655.35); - 2.0309, 2.0288, 656.15, 655.35); + //2.0309, 2.0288, 659.15, 655.35); // orig + 2.0157, 2.0428, 662.11, 662.85); // ######################### INTERRUPTS ######################### void isr () { // Interrupt service routine is executed when a HIGH to LOW transition is detected on CLK diff --git a/src/Temperature/Temperature.cpp b/src/Temperature/Temperature.cpp index b75d264..d2f0861 100644 --- a/src/Temperature/Temperature.cpp +++ b/src/Temperature/Temperature.cpp @@ -70,8 +70,10 @@ void Temperature::measure(boolean ln) { #ifdef DEBUG Serial.print(_name); Serial.print(","); - //Serial.print(_VoutAnalogSample); - //Serial.print(workingSample); + Serial.print(_VoutAnalogSample); + Serial.print(","); + Serial.print(workingSample); + Serial.print(","); Serial.print(_measuredTemperature); //Serial.print(GetMedianAverage(_rTemperatureMeasurements, 6)); Serial.print(","); diff --git a/src/Temperature/Temperature.h b/src/Temperature/Temperature.h index 7137779..8bb7fdd 100644 --- a/src/Temperature/Temperature.h +++ b/src/Temperature/Temperature.h @@ -8,7 +8,7 @@ #include "Arduino.h" -//#define DEBUG +#define DEBUG #define CONSTANT_ADC_STEP_COUNT 1024.0 -- 2.24.1