summaryrefslogtreecommitdiff
path: root/debug/data_logging_teensy_temp
diff options
context:
space:
mode:
authorabel <abel.tim.t@gmail.com>2024-10-08 17:41:29 +0200
committerabel <abel.tim.t@gmail.com>2024-10-08 17:41:29 +0200
commit5340707b87937d62c6d72197cf494d67851d05e3 (patch)
tree6015df961f22f1850dcefb781ce1475fedab2216 /debug/data_logging_teensy_temp
parente0ee73e9de937e15fa1a60b7fe6fa081435119aa (diff)
downloadrobotica-5340707b87937d62c6d72197cf494d67851d05e3.tar.gz
robotica-5340707b87937d62c6d72197cf494d67851d05e3.zip
UPDATE FOLDER STUCTURE
MOET APARTE_PCB NOG VERWIJDERTEN WINDOWS HEEFT BEST VERGRENDELD
Diffstat (limited to 'debug/data_logging_teensy_temp')
-rw-r--r--debug/data_logging_teensy_temp/InternalTemperature-master.zipbin246290 -> 0 bytes
-rw-r--r--debug/data_logging_teensy_temp/data_logging_teensy_temp.ino63
2 files changed, 0 insertions, 63 deletions
diff --git a/debug/data_logging_teensy_temp/InternalTemperature-master.zip b/debug/data_logging_teensy_temp/InternalTemperature-master.zip
deleted file mode 100644
index 64b7dc4..0000000
--- a/debug/data_logging_teensy_temp/InternalTemperature-master.zip
+++ /dev/null
Binary files differ
diff --git a/debug/data_logging_teensy_temp/data_logging_teensy_temp.ino b/debug/data_logging_teensy_temp/data_logging_teensy_temp.ino
deleted file mode 100644
index fcd6c64..0000000
--- a/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);
-}