From e37834a82810c399a754d5ce8ff1c87543f55507 Mon Sep 17 00:00:00 2001 From: Ta180m Date: Sat, 22 Feb 2020 08:04:59 -0600 Subject: Update Detector_Building_v2.ino --- Detector_Building_v2/Detector_Building_v2.ino | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Detector_Building_v2/Detector_Building_v2.ino b/Detector_Building_v2/Detector_Building_v2.ino index 1d80ca3..2ea0636 100644 --- a/Detector_Building_v2/Detector_Building_v2.ino +++ b/Detector_Building_v2/Detector_Building_v2.ino @@ -34,23 +34,23 @@ void setup() { sort(V, n); sort(T, n); - Serial.print(log(v2r(0.1))); + /*Serial.print(log(v2r(0.1))); Serial.print(" "); Serial.print(log(v2r(4.9))); - Serial.println(); + Serial.println();*/ double x[n], y[n]; for (int i = 0; i < n; i++) x[i] = log(v2r(V[i])) - 5; for (int i = 0; i < n; i++) y[i] = 1 / c2k(T[i]); - for (int i = 0; i < n; i++) { + /*for (int i = 0; i < n; i++) { Serial.print(x[i], 12); Serial.print(" "); Serial.print(y[i], 12); Serial.println(); - } + }*/ for (int i = 0; i < m; i++) { int ret = fitCurve(deg, n / m, x + i * n / m, y + i * n / m, deg + 1, coeff[i]); - if (ret == 0){ //Returned value is 0 if no error + /*if (ret == 0){ //Returned value is 0 if no error char c = 'A'; Serial.println("Coefficients are:"); for (int j = 0; j <= deg; j++){ @@ -59,7 +59,7 @@ void setup() { Serial.print(coeff[i][j], 12); Serial.println(); } - } + }*/ } } @@ -125,10 +125,10 @@ void loop() { // For reference //Serial.print(" Temperature (°F): "); //Serial.print(F); - Serial.print(" s: "); + /*Serial.print(" s: "); Serial.print(s); Serial.print(" logR: "); - Serial.print(logR); + Serial.print(logR);*/ Serial.println(); delay(500); return; -- cgit v1.2.3-70-g09d2