diff options
-rw-r--r-- | Detector_Building/.vscode/arduino.json | 5 | ||||
-rw-r--r-- | Detector_Building/.vscode/c_cpp_properties.json | 19 | ||||
-rw-r--r-- | Detector_Building/Detector_Building.ino | 4 |
3 files changed, 26 insertions, 2 deletions
diff --git a/Detector_Building/.vscode/arduino.json b/Detector_Building/.vscode/arduino.json new file mode 100644 index 0000000..913e7c1 --- /dev/null +++ b/Detector_Building/.vscode/arduino.json @@ -0,0 +1,5 @@ +{ + "sketch": "Detector_Building.ino", + "port": "COM3", + "board": "arduino:avr:uno" +}
\ No newline at end of file diff --git a/Detector_Building/.vscode/c_cpp_properties.json b/Detector_Building/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..13080d0 --- /dev/null +++ b/Detector_Building/.vscode/c_cpp_properties.json @@ -0,0 +1,19 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "C:\\Program Files (x86)\\Arduino\\tools\\**", + "C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\**" + ], + "forcedInclude": [ + "C:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino\\Arduino.h" + ], + "intelliSenseMode": "msvc-x64", + "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe", + "cStandard": "c11", + "cppStandard": "c++17" + } + ], + "version": 4 +}
\ No newline at end of file diff --git a/Detector_Building/Detector_Building.ino b/Detector_Building/Detector_Building.ino index 7b5a2be..8937b39 100644 --- a/Detector_Building/Detector_Building.ino +++ b/Detector_Building/Detector_Building.ino @@ -51,8 +51,8 @@ void sort(double a[], int n) { // Calibration data const int n = 3, m = n / 3; // Number of data points, MUST be multiple of 3 -double V[n] = { 2.5, 3.26, 3.96 }; // Voltage measurements -double T[n] = { 25, 39.15, 60 }; // Temperature measurements +double V[n] = { 1.3, 3.26, 3.96 }; // Voltage measurements +double T[n] = { 22.0, 39.15, 60 }; // Temperature measurements double V_mid[m]; // Stores each piecewise segment for binary search double A[m], B[m], C[m]; // Coefficients for each piecewise component |