summaryrefslogtreecommitdiff
path: root/CODE/debug/data_logging_teensy_temp/data_logging_teensy_temp.ino
diff options
context:
space:
mode:
authorAbel Tim <abel@abel-ms7c95.home>2025-03-17 21:43:59 +0100
committerAbel Tim <abel@abel-ms7c95.home>2025-03-17 21:43:59 +0100
commit9c8f7e2f1101b4bb8e0c5459e14af253f150c8b7 (patch)
treef6baef3949190537fb37f3ac21b965f83c8f7407 /CODE/debug/data_logging_teensy_temp/data_logging_teensy_temp.ino
parentbf474ec55fce14f778efa1c1e8118d69a093bf07 (diff)
downloadrobotica-9c8f7e2f1101b4bb8e0c5459e14af253f150c8b7.tar.gz
robotica-9c8f7e2f1101b4bb8e0c5459e14af253f150c8b7.zip
code
Diffstat (limited to 'CODE/debug/data_logging_teensy_temp/data_logging_teensy_temp.ino')
-rw-r--r--CODE/debug/data_logging_teensy_temp/data_logging_teensy_temp.ino63
1 files changed, 0 insertions, 63 deletions
diff --git a/CODE/debug/data_logging_teensy_temp/data_logging_teensy_temp.ino b/CODE/debug/data_logging_teensy_temp/data_logging_teensy_temp.ino
deleted file mode 100644
index fcd6c64..0000000
--- a/CODE/debug/data_logging_teensy_temp/data_logging_teensy_temp.ino
+++ /dev/null
@@ -1,63 +0,0 @@
-#include <InternalTemperature.h>
-#include <SD.h>
-#include <SPI.h>
-
-File ;
-File avrage;
-const int chipSelect = BUILTIN_SDCARD;
-
-/
-
-void setup()
-{
- Serial.begin(9600);
-
- //open current loop motor values file
- current = SD.open("motor_values.csv", FILE_WRITE);
-
- while(true){
- if (current) {
- if (SD.exists((String("motor_values") + x + ".csv").c_str())){
- Serial.println(((String)"motor_values"+x+".csv already exists"));
- x++;
- } else {
- Serial.println((String)"motor_values"+x+".csv"" doesn't exist.");
- Serial.println((String)"creating motor_values"+x+".csv");
- current = SD.open(((String("motor_values") + x + ".csv").c_str()), FILE_WRITE);
- break;
- }
- }
- delay(1);
- }
- Serial.println("!!!setup complete!!!");
-}
-
-
-void loop()
-{
- String currentvals = "";
- String avrvals = "";
-
- currentvals += InternalTemperature.readTemperatureC();
- d_println("°C");
- debugdataString += "°C";
-
- //log sensor data to sensor log
- sensordataString += InternalTemperature.readTemperatureC();
- sensordataString += ", ";
-
- //open sensor log file
- File csvfile = SD.open((String("motor_values") + x + ".csv").c_str()), FILE_WRITE);
- if (csvfile) {
- csvfile.println(sensordataString);
- csvfile.close();
- }
-
- //open debug file
- File dataFile = SD.open("avrage_motor_values.txt", FILE_WRITE);
- if (dataFile) {
- dataFile.println((String)"debug data:"+debugdataString+"sensor data"+sensordataString);
- dataFile.close();
- }
- delay(1000);
-}