aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTa180m2020-03-05 15:46:48 -0600
committerTa180m2020-03-05 15:46:48 -0600
commitf9a1733d61aa254e16a35d6045ae553f1862f9a3 (patch)
treecfa457d6492984ccded2fb3d0d156a6e10444209
parent2ec448283444d3cdda693e2e1784cc02b170581c (diff)
Added a cool logo, because why not
-rw-r--r--Detector_Building_v2/Detector_Building_v2.ino15
1 files changed, 11 insertions, 4 deletions
diff --git a/Detector_Building_v2/Detector_Building_v2.ino b/Detector_Building_v2/Detector_Building_v2.ino
index b63f792..0c8a891 100644
--- a/Detector_Building_v2/Detector_Building_v2.ino
+++ b/Detector_Building_v2/Detector_Building_v2.ino
@@ -1,5 +1,12 @@
/*
- Detector Building v2
+ ______ _______ _______ _______ _______ _______ _____ ______
+ | \ |______ | |______ | | | | |_____/
+ |_____/ |______ | |______ |_____ | |_____| | \_
+
+ ______ _ _ _____ ______ _____ __ _ ______ _ _ _______
+ |_____] | | | | \ | | \ | | ____ \ / ______|
+ |_____] |_____| __|__ |_____/ __|__ | \_| |_____| \/ |______
+
Code by Anthony Wang
Ladue High School Science Olympiad
*/
@@ -50,7 +57,7 @@ void setup() {
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]);
+ 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
char c = 'A';
Serial.println("Coefficients are:");
@@ -79,8 +86,8 @@ void loop() {
return;
}
- int s = 0;
- while (s + 1 < m && V_out < (V[s * n / m - 1] + V[s * n / m]) / 2) s++; // Find correct segment
+ int s = 0; // Find correct segment
+ while (s + 1 < m && V_out < (V[s*n/m-1] + V[s*n/m]) / 2) s++;
ld logR = log(v2r(V_out)) - 7;
ld sum = 0, prod = 1;